From 1533e88deefb39f4e19cf4fefd8d858f4726e4ca Mon Sep 17 00:00:00 2001 From: tikhop Date: Sun, 28 Apr 2024 00:55:18 +0200 Subject: [PATCH 1/3] chore: Update readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b1e20d6..75d4969 100644 --- a/README.md +++ b/README.md @@ -201,9 +201,11 @@ InAppReceipt.refresh { (error) in * [Apple - Receipt Validation Programming Guide](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html#//apple_ref/doc/uid/TP40010573-CH106-SW1) * [Apple - Validating Receipts Locally](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html) * [fluffy.es - Tutorial: Read and validate in-app purchase receipt locally using TPInAppReceipt](https://fluffy.es/in-app-purchase-receipt-local/) +* [Faisal Bin Ahmed - All the wrong ways to persist in-app purchase status in your macOS app](https://medium.com/@Faisalbin/all-the-wrong-ways-to-persist-in-app-purchase-status-in-your-macos-app-ce6eb9bcb0c3) * [objc.io - Receipt Validation](https://www.objc.io/issues/17-security/receipt-validation/) + ## License TPInAppReceipt is released under an MIT license. See [LICENSE](https://github.com/tikhop/TPInAppReceipt/blob/master/LICENSE) for more information. From 5c98719f048e4d352f662dbba20e62c0c398bcf9 Mon Sep 17 00:00:00 2001 From: tikhop Date: Sun, 28 Apr 2024 00:56:09 +0200 Subject: [PATCH 2/3] feat: Remove unnecessary availability checks --- Sources/Extras.swift | 4 ---- Sources/Validation.swift | 1 - 2 files changed, 5 deletions(-) diff --git a/Sources/Extras.swift b/Sources/Extras.swift index 768f999..d68e61a 100644 --- a/Sources/Extras.swift +++ b/Sources/Extras.swift @@ -57,8 +57,6 @@ public class SKSubscriptionGroup public typealias GroupIdentifier = String -@available(tvOS 12.0, *) -@available(iOS 12.0, *) @available(macOS 10.14, *) public extension SKProductsResponse { @@ -127,7 +125,6 @@ public extension SKProductsResponse } } -@available(tvOS 12.0, *) @available(macOS 10.14, *) public extension InAppReceipt { @@ -177,7 +174,6 @@ public extension InAppReceipt /// Check whether user is eligible for introductory offer for any products within the same subscription group /// /// - Returns `false` if user isn't eligible for introductory offer, otherwise `true` - @available(iOS 12.0, *) func isEligibleForIntroductoryOffer(for group: SKSubscriptionGroup) -> Bool { let array = purchases.filter { $0.subscriptionTrialPeriod || $0.subscriptionIntroductoryPricePeriod } diff --git a/Sources/Validation.swift b/Sources/Validation.swift index fc98ddb..daedfc0 100644 --- a/Sources/Validation.swift +++ b/Sources/Validation.swift @@ -219,7 +219,6 @@ public extension InAppReceipt } } - @available(OSX 10.12, iOS 10.0, tvOS 10.0, watchOS 3.0, *) func checkSignatureValidity() throws { guard let signature = signature else From 8628d18a3ea6dfa0ed97f7c63738ef58f812f747 Mon Sep 17 00:00:00 2001 From: tikhop Date: Sun, 28 Apr 2024 01:00:50 +0200 Subject: [PATCH 3/3] fix: Static framework privacy file podspec --- TPInAppReceipt.podspec | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/TPInAppReceipt.podspec b/TPInAppReceipt.podspec index 4d0ff1b..d556255 100644 --- a/TPInAppReceipt.podspec +++ b/TPInAppReceipt.podspec @@ -1,15 +1,15 @@ Pod::Spec.new do |s| - s.name = "TPInAppReceipt" - s.version = "3.4.1" - s.summary = "Reading and Validating In App Purchase Receipt Locally" - s.description = "A lightweight iOS/OSX library for reading and validating Apple In App Purchase Receipt locally. Pure swift, No OpenSSL!" + s.name = "TPInAppReceipt" + s.version = "3.4.2" + s.summary = "Reading and Validating In App Purchase Receipt Locally" + s.description = "A lightweight iOS/OSX library for reading and validating Apple In App Purchase Receipt locally. Pure swift, No OpenSSL!" - s.homepage = "https://github.com/tikhop/TPInAppReceipt" - s.license = "MIT" - s.source = { :git => "https://github.com/tikhop/TPInAppReceipt.git", :tag => "#{s.version}" } + s.homepage = "https://github.com/tikhop/TPInAppReceipt" + s.license = "MIT" + s.source = { :git => "https://github.com/tikhop/TPInAppReceipt.git", :tag => "#{s.version}" } - s.author = { "tikhop" => "hi@tikhop.com" } + s.author = { "tikhop" => "hi@tikhop.com" } s.swift_versions = ['5.3'] s.ios.deployment_target = '12.0' @@ -22,16 +22,17 @@ Pod::Spec.new do |s| s.subspec 'Core' do |core| core.exclude_files = "Sources/Objc/*.{swift}" - core.source_files = "Sources/*.{swift}" - core.resources = "Sources/AppleIncRootCertificate.cer", "Sources/StoreKitTestCertificate.cer", "Source/PrivacyInfo.xcprivacy" - core.dependency 'ASN1Swift', '~> 1.2.6' + core.source_files = "Sources/*.{swift}" + core.resources = "Sources/AppleIncRootCertificate.cer", "Sources/StoreKitTestCertificate.cer" + core.dependency 'ASN1Swift', '~> 1.2.7' end s.subspec 'Objc' do |objc| - objc.source_files = "Sources/Objc/*.{swift}" + objc.source_files = "Sources/Objc/*.{swift}" objc.dependency 'TPInAppReceipt/Core' end + s.resource_bundles = { "TPInAppReceipt" => "Source/PrivacyInfo.xcprivacy" } s.default_subspecs = 'Core' end