Skip to content

Commit

Permalink
Merge pull request #123 from tikhop/3.4.2
Browse files Browse the repository at this point in the history
fix: Use resource_bundles for PrivacyInfo.xcprivacy
  • Loading branch information
tikhop authored May 15, 2024
2 parents e135055 + 8628d18 commit 03bd436
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 0 additions & 4 deletions Sources/Extras.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -127,7 +125,6 @@ public extension SKProductsResponse
}
}

@available(tvOS 12.0, *)
@available(macOS 10.14, *)
public extension InAppReceipt
{
Expand Down Expand Up @@ -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 }
Expand Down
1 change: 0 additions & 1 deletion Sources/Validation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 13 additions & 12 deletions TPInAppReceipt.podspec
Original file line number Diff line number Diff line change
@@ -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" => "[email protected]" }
s.author = { "tikhop" => "[email protected]" }

s.swift_versions = ['5.3']
s.ios.deployment_target = '12.0'
Expand All @@ -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

0 comments on commit 03bd436

Please sign in to comment.