diff --git a/README.md b/README.md
index aec34b18..d3aaaeb8 100644
--- a/README.md
+++ b/README.md
@@ -9,60 +9,26 @@
SwiftyStoreKit is a lightweight In App Purchases framework for iOS, tvOS, watchOS, macOS, and Mac Catalyst.
+## Features
+- Super easy-to-use block-based API
+- Support for consumable and non-consumable in-app purchases
+- Support for free, auto-renewable and non-renewing subscriptions
+- Support for in-app purchases started in the App Store (iOS 11)
+- Support for subscription discounts and offers
+- Remote receipt verification
+- Verify purchases, subscriptions, subscription groups
+- Downloading content hosted with Apple
+- iOS, tvOS, watchOS, macOS, and Catalyst compatible
+
## Contributions Wanted
SwiftyStoreKit makes it easy for an incredible number of developers to seemlessly integrate in-App Purchases. This project, however, is now **community-led**. We need help building out features and writing tests (see [issue #550](https://github.com/bizz84/SwiftyStoreKit/issues/550)).
### Maintainers Wanted
+The author is no longer maintaining this project actively. If you'd like to become a maintainer, [join the Slack workspace](https://join.slack.com/t/swiftystorekit/shared_invite/enQtODY3OTYxOTExMzE5LWVkNGY4MzcwY2VjNGM4MGU4NDFhMGE5YmUxMGM3ZTQ4NjVjNTRkNTJhNDAyMWZmY2M5OWE5MDE0ODc3OGJjMmM) and enter the [#maintainers](https://app.slack.com/client/TL2JYQ458/CLG62K26A/details/) channel.
+Going forward, SwiftyStoreKit should be made for the community, by the community.
+
+More info here: [The Future of SwiftyStoreKit: Maintainers Wanted](https://medium.com/@biz84/the-future-of-swiftystorekit-maintainers-needed-f60d01572c91).
-- The author is no longer maintaining this project actively. If you'd like to become a maintainer, [join the Slack workspace](https://join.slack.com/t/swiftystorekit/shared_invite/enQtODY3OTYxOTExMzE5LWVkNGY4MzcwY2VjNGM4MGU4NDFhMGE5YmUxMGM3ZTQ4NjVjNTRkNTJhNDAyMWZmY2M5OWE5MDE0ODc3OGJjMmM) and enter the [#maintainers](https://app.slack.com/client/TL2JYQ458/CLG62K26A/details/) channel.
-- Going forward, SwiftyStoreKit should be made for the community, by the community.
-
-More info here:
-
-- [The Future of SwiftyStoreKit: Maintainers Wanted](https://medium.com/@biz84/the-future-of-swiftystorekit-maintainers-needed-f60d01572c91)
-
-### Join on Slack
-
-SwiftyStoreKit is on Slack. [Join here](https://join.slack.com/t/swiftystorekit/shared_invite/enQtODY3OTYxOTExMzE5LWVkNGY4MzcwY2VjNGM4MGU4NDFhMGE5YmUxMGM3ZTQ4NjVjNTRkNTJhNDAyMWZmY2M5OWE5MDE0ODc3OGJjMmM).
-
-## Content
-
-- [Requirements](#requirements)
-- [Installation](#installation)
- - [Swift Package Manager](#swift-package-manager)
- - [Carthage](#carthage)
- - [CocoaPods](#cocoapods)
-- [Features](#features)
-- [Contributing](#contributing)
-- [App startup](#app-startup)
- - [Complete Transactions](#complete-transactions)
-- [Purchases](#purchases)
- - [Retrieve products info](#retrieve-products-info)
- - [Purchase a product (given a product id)](#purchase-a-product-given-a-product-id)
- - [Purchase a product (given a SKProduct)](#purchase-a-product-given-a-skproduct)
- - [Handle purchases started on the App Store (iOS 11)](#handle-purchases-started-on-the-app-store-ios-11)
- - [Restore previous purchases](#restore-previous-purchases)
- - [Downloading content hosted with Apple](#downloading-content-hosted-with-apple)
-- [Receipt verification](#receipt-verification)
- - [Retrieve local receipt (encrypted)](#retrieve-local-receipt-encrypted)
- - [Fetch receipt (encrypted)](#fetch-receipt-encrypted)
- - [Verify Receipt](#verify-receipt)
-- [Verifying purchases and subscriptions](#verifying-purchases-and-subscriptions)
- - [Verify Purchase](#verify-purchase)
- - [Verify Subscription](#verify-subscription)
- - [Subscription Groups](#subscription-groups)
- - [Get distinct purchase identifiers](#get-distinct-purchase-identifiers)
-- [Notes](#notes)
-- [Change Log](#change-log)
-- [Sample Code](#sample-code)
-- [Essential Reading](#essential-reading)
- - [Troubleshooting](#troubleshooting)
-- [Video Tutorials](#video-tutorials)
-- [Payment flows: implementation details](#payment-flows-implementation-details)
-- [Credits](#credits)
-- [Apps using SwiftyStoreKit](#apps-using-swiftystorekit)
-- [License](#license)
-
## Requirements
If you've shipped an app in the last five years, you're probably good to go. Some features (like discounts) are only available on new OS versions, but most features are available as far back as:
@@ -71,7 +37,7 @@ If you've shipped an app in the last five years, you're probably good to go. Som
| 8.0 | 6.2 | 9.0 | 10.10 | 13.0 |
## Installation
-There are a number of ways to install SwiftyStoreKit for your project. Swift Package Manager and Carthage integrations are the preferred and recommended approaches. Unfortunately, CocoaPods is currently not supported / outdated (see below for details).
+There are a number of ways to install SwiftyStoreKit for your project. Swift Package Manager, CocoaPods, and Carthage integrations are the preferred and recommended approaches.
Regardless, make sure to import the project wherever you may use it:
@@ -80,7 +46,6 @@ import SwiftyStoreKit
```
### Swift Package Manager
-
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into Xcode and the Swift compiler. **This is the recommended installation method.** Updates to SwiftyStoreKit will always be available immediately to projects with SPM. SPM is also integrated directly with Xcode.
If you are using Xcode 11 or later:
@@ -94,7 +59,6 @@ https://github.com/bizz84/SwiftyStoreKit.git
```
### Carthage
-
To integrate SwiftyStoreKit into your Xcode project using [Carthage](https://github.com/Carthage/Carthage), specify it in your Cartfile:
```ogdl
@@ -112,22 +76,11 @@ use_frameworks!
pod 'SwiftyStoreKit'
```
-## Features
-
-- Super easy-to-use block-based API
-- Support for consumable and non-consumable in-app purchases
-- Support for free, auto-renewable and non-renewing subscriptions
-- Support for in-app purchases started in the App Store (iOS 11)
-- Support for subscription discounts and offers
-- Remote receipt verification
-- Verify purchases, subscriptions, subscription groups
-- Downloading content hosted with Apple
-- iOS, tvOS, watchOS, macOS, and Catalyst compatible
-
## Contributing
+Got issues / pull requests / want to contribute? [Read here](CONTRIBUTING.md).
-#### Got issues / pull requests / want to contribute? [Read here](CONTRIBUTING.md).
-
+# Documentation
+Full documentation is available on the [SwiftyStoreKit Wiki](https://github.com/bizz84/SwiftyStoreKit/wiki). As SwiftyStoreKit (and Apple's StoreKit) gains features, platforms, and implementation approaches, new information will be added to the Wiki. Essential documentation is available here in the README and should be enough to get you up and running.
## App startup
@@ -237,60 +190,17 @@ SwiftyStoreKit.purchaseProduct("com.musevisions.SwiftyStoreKit.Purchase1", quant
}
```
-### Purchase a product (given a SKProduct)
-
-This is a variant of the method above that can be used to purchase a product when the corresponding `SKProduct` has already been retrieved with `retrieveProductsInfo`:
-
-```swift
-SwiftyStoreKit.retrieveProductsInfo(["com.musevisions.SwiftyStoreKit.Purchase1"]) { result in
- if let product = result.retrievedProducts.first {
- SwiftyStoreKit.purchaseProduct(product, quantity: 1, atomically: true) { result in
- // handle result (same as above)
- }
- }
-}
-```
-
-Using this `purchaseProduct` method guarantees that only one network call is made to StoreKit to perform the purchase, as opposed to one call to get the product and another to perform the purchase.
-
-### Handle purchases started on the App Store (iOS 11)
-
-iOS 11 adds a new delegate method on `SKPaymentTransactionObserver`:
-
-```swift
-@available(iOS 11.0, *)
-optional public func paymentQueue(_ queue: SKPaymentQueue, shouldAddStorePayment payment: SKPayment, for product: SKProduct) -> Bool
-```
-
-From [Apple Docs](https://developer.apple.com/documentation/storekit/skpaymenttransactionobserver/2877502-paymentqueue):
-
-> This delegate method is called when the user has started an in-app purchase in the App Store, and is continuing the transaction in your app. Specifically, if your app is already installed, the method is called automatically.
-If your app is not yet installed when the user starts the in-app purchase in the App Store, the user gets a notification when the app installation is complete. This method is called when the user taps the notification. Otherwise, if the user opens the app manually, this method is called only if the app is opened soon after the purchase was started.
-
-SwiftyStoreKit supports this with a new handler, called like this:
-
-```swift
-SwiftyStoreKit.shouldAddStorePaymentHandler = { payment, product in
- // return true if the content can be delivered by your app
- // return false otherwise
-}
-```
-
-To test this in sandbox mode, open this URL in Safari:
-
-```
-itms-services://?action=purchaseIntent&bundleId=com.example.app&productIdentifier=product_name
-```
-
-More information on the [WWDC17 session What's New in StoreKit](https://developer.apple.com/videos/play/wwdc2017/303)
-([slide number 165](https://devstreaming-cdn.apple.com/videos/wwdc/2017/303f0u5froddl13/303/303_whats_new_in_storekit.pdf) shows the link above).
+### Additional Purchase Documentation
+These additional topics are available on the Wiki:
+- [Purchase a product (given a SKProduct)](https://github.com/bizz84/SwiftyStoreKit/wiki/Purchasing#purchase-a-product-given-a-skproduct)
+- [Handle purchases started on the App Store (iOS 11)](https://github.com/bizz84/SwiftyStoreKit/wiki/App-Store-Purchases)
-### Restore previous purchases
+### Restore Previous Purchases
According to [Apple - Restoring Purchased Products](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Restoring.html#//apple_ref/doc/uid/TP40008267-CH8-SW9):
> In most cases, all your app needs to do is refresh its receipt and deliver the products in its receipt. The refreshed receipt contains a record of the user’s purchases in this app, on this device or any other device.
-
+>
> Restoring completed transactions creates a new transaction for every completed transaction the user made, essentially replaying history for your transaction queue observer.
See the **Receipt Verification** section below for how to restore previous purchases using the receipt.
@@ -336,41 +246,12 @@ SwiftyStoreKit.restorePurchases(atomically: false) { results in
```
#### What does atomic / non-atomic mean?
-
-When you purchase a product the following things happen:
-
-* A payment is added to the payment queue for your IAP.
-* When the payment has been processed with Apple, the payment queue is updated so that the appropriate transaction can be handled.
-* If the transaction state is **purchased** or **restored**, the app can unlock the functionality purchased by the user.
-* The app should call `finishTransaction(_:)` to complete the purchase.
-
-This is what is [recommended by Apple](https://developer.apple.com/reference/storekit/skpaymentqueue/1506003-finishtransaction):
-
-> Your application should call `finishTransaction(_:)` only after it has successfully processed the transaction and unlocked the functionality purchased by the user.
-
-* A purchase is **atomic** when the app unlocks the functionality purchased by the user immediately and call `finishTransaction(_:)` at the same time. This is desirable if you're unlocking functionality that is already inside the app.
-
-* In cases when you need to make a request to your own server in order to unlock the functionality, you can use a **non-atomic** purchase instead.
-
-* **Note**: SwiftyStoreKit doesn't yet support downloading content hosted by Apple for non-consumable products. See [this feature request](https://github.com/bizz84/SwiftyStoreKit/issues/128).
-
-SwiftyStoreKit provides three operations that can be performed **atomically** or **non-atomically**:
-
-* Making a purchase
-* Restoring purchases
-* Completing transactions on app launch
+For more information about atomic vs. non-atomic restorations, [view the Wiki page here](https://github.com/bizz84/SwiftyStoreKit/wiki/Restoring#what-does-atomic--non-atomic-mean).
### Downloading content hosted with Apple
+More information about downloading hosted content is [available on the Wiki](https://github.com/bizz84/SwiftyStoreKit/wiki/Downloading-Content).
-Quoting Apple Docs:
-
-> When you create a product in iTunes Connect, you can associate one or more pieces of downloadable content with it. At runtime, when a product is purchased by a user, your app uses SKDownload objects to download the content from the App Store.
-
-> Your app never directly creates a SKDownload object. Instead, after a payment is processed, your app reads the transaction object’s downloads property to retrieve an array of SKDownload objects associated with the transaction.
-
-> To download the content, you queue a download object on the payment queue and wait for the content to be downloaded. After a download completes, read the download object’s contentURL property to get a URL to the downloaded content. Your app must process the downloaded file before completing the transaction. For example, it might copy the file into a directory whose contents are persistent. When all downloads are complete, you finish the transaction. After the transaction is finished, the download objects cannot be queued to the payment queue and any URLs to the downloaded content are invalid.
-
-To start the downloads (this can be done in `purchaseProduct()`, `completeTransactions()` or `restorePurchases()`):
+To start downloads (this can be done in `purchaseProduct()`, `completeTransactions()` or `restorePurchases()`):
```swift
SwiftyStoreKit.purchaseProduct("com.musevisions.SwiftyStoreKit.Purchase1", quantity: 1, atomically: false) { result in
@@ -390,7 +271,6 @@ To check the updated downloads, setup a `updatedDownloadsHandler` block in your
```swift
SwiftyStoreKit.updatedDownloadsHandler = { downloads in
-
// contentURL is not nil if downloadState == .finished
let contentURLs = downloads.flatMap { $0.contentURL }
if contentURLs.count == downloads.count {
@@ -404,20 +284,6 @@ To control the state of the downloads, SwiftyStoreKit offers `start()`, `pause()
## Receipt verification
-According to [Apple - Delivering Products](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/DeliverProduct.html#//apple_ref/doc/uid/TP40008267-CH5-SW4):
-
-> The app receipt contains a record of the user’s purchases, cryptographically signed by Apple. For more information, see [Receipt Validation Programming Guide](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Introduction.html#//apple_ref/doc/uid/TP40010573).
-
-> Information about consumable products is added to the receipt when they’re paid for and remains in the receipt until you finish the transaction. After you finish the transaction, this information is removed the next time the receipt is updated—for example, the next time the user makes a purchase.
-
-> Information about all other kinds of purchases is added to the receipt when they’re paid for and remains in the receipt indefinitely.
-
-When an app is first installed, the app receipt is missing.
-
-As soon as a user completes a purchase or restores purchases, StoreKit creates and stores the receipt locally as a file, located by `Bundle.main.appStoreReceiptURL`.
-
-### Retrieve local receipt (encrypted)
-
This helper can be used to retrieve the (encrypted) local receipt data:
```swift
@@ -426,11 +292,7 @@ let receiptString = receiptData.base64EncodedString(options: [])
// do your receipt validation here
```
-However, the receipt file may be missing or outdated.
-
-### Fetch receipt (encrypted)
-
-Use this method to get the updated receipt:
+However, the receipt file may be missing or outdated. Use this method to get the updated receipt:
```swift
SwiftyStoreKit.fetchReceipt(forceRefresh: true) { result in
@@ -444,26 +306,6 @@ SwiftyStoreKit.fetchReceipt(forceRefresh: true) { result in
}
```
-This method works as follows:
-
-* If `forceRefresh = false`, it returns the local receipt from file, or refreshes it if missing.
-* If `forceRefresh = true`, it always refreshes the receipt regardless.
-
-**Notes**
-
-* If the local receipt is missing or `forceRefresh = true` when calling `fetchReceipt`, a network call is made to refresh it.
-* If the user is not logged to the App Store, StoreKit will present a popup asking to **Sign In to the iTunes Store**.
-* If the user enters valid credentials, the receipt will be refreshed.
-* If the user cancels, receipt refresh will fail with a **Cannot connect to iTunes Store** error.
-
-If `fetchReceipt` is successful, it will return the **encrypted** receipt as a string. For this reason, a **validation** step is needed to get all the receipt fields in readable form. This can be done in various ways:
-
-1. Validate with Apple via the `AppleReceiptValidator` (see [`verifyReceipt`](#verify-receipt) below).
-2. Perform local receipt validation (see [#101](https://github.com/bizz84/SwiftyStoreKit/issues/101)).
-3. Post the receipt data and validate on server.
-
-### Verify Receipt
-
Use this method to (optionally) refresh the receipt and perform validation in one step.
```swift
@@ -478,25 +320,11 @@ SwiftyStoreKit.verifyReceipt(using: appleValidator, forceRefresh: false) { resul
}
```
-**Notes**
-
-* This method is based on `fetchReceipt`, and the same refresh logic discussed above applies.
-* `AppleReceiptValidator` is a **reference implementation** that validates the receipt with Apple and results in a network call. _This is prone to man-in-the-middle attacks._
-* You should implement your secure logic by validating your receipt locally, or sending the encrypted receipt data and validating it in your server.
-* Local receipt validation is not implemented (see [issue #101](https://github.com/bizz84/SwiftyStoreKit/issues/101) for details).
-* You can implement your own receipt validator by conforming to the `ReceiptValidator` protocol and passing it to `verifyReceipt`.
+Additional details about receipt verification are [available on the wiki](https://github.com/bizz84/SwiftyStoreKit/wiki/Verify-Receipt).
## Verifying purchases and subscriptions
-
Once you have retrieved the receipt using the `verifyReceipt` method, you can verify your purchases and subscriptions by product identifier.
-Verifying multiple purchases and subscriptions in one call is not yet supported (see [issue #194](https://github.com/bizz84/SwiftyStoreKit/issues/194) for more details).
-
-If you need to verify multiple purchases / subscriptions, you can either:
-
-* manually parse the receipt dictionary returned by `verifyReceipt`
-* call `verifyPurchase` or `verifySubscription` multiple times with different product identifiers
-
### Verify Purchase
```swift
@@ -522,15 +350,12 @@ SwiftyStoreKit.verifyReceipt(using: appleValidator) { result in
}
```
-Note that for consumable products, the receipt will only include the information for a couple of minutes after the purchase.
-
### Verify Subscription
-
This can be used to check if a subscription was previously purchased, and whether it is still active or if it's expired.
From [Apple - Working with Subscriptions](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html#//apple_ref/doc/uid/TP40008267-CH7-SW6):
-> keep a record of the date that each piece of content is published. Read the Original Purchase Date and Subscription Expiration Date field from each receipt entry to determine the start and end dates of the subscription.
+> Keep a record of the date that each piece of content is published. Read the Original Purchase Date and Subscription Expiration Date field from each receipt entry to determine the start and end dates of the subscription.
When one or more subscriptions are found for a given product id, they are returned as a `ReceiptItem` array ordered by `expiryDate`, with the first one being the newest.
@@ -561,69 +386,7 @@ SwiftyStoreKit.verifyReceipt(using: appleValidator) { result in
}
```
-#### Auto-Renewable
-```swift
-let purchaseResult = SwiftyStoreKit.verifySubscription(
- ofType: .autoRenewable,
- productId: "com.musevisions.SwiftyStoreKit.Subscription",
- inReceipt: receipt)
-```
-
-#### Non-Renewing
-```swift
-// validDuration: time interval in seconds
-let purchaseResult = SwiftyStoreKit.verifySubscription(
- ofType: .nonRenewing(validDuration: 3600 * 24 * 30),
- productId: "com.musevisions.SwiftyStoreKit.Subscription",
- inReceipt: receipt)
-```
-
-**Notes**
-
-* The expiration dates are calculated against the receipt date. This is the date of the last successful call to `verifyReceipt`.
-* When purchasing subscriptions in sandbox mode, the expiry dates are set just minutes after the purchase date for testing purposes.
-
-#### Purchasing and verifying a subscription
-
-The `verifySubscription` method can be used together with the `purchaseProduct` method to purchase a subscription and check its expiration date, like so:
-
-```swift
-let productId = "your-product-id"
-SwiftyStoreKit.purchaseProduct(productId, atomically: true) { result in
-
- if case .success(let purchase) = result {
- // Deliver content from server, then:
- if purchase.needsFinishTransaction {
- SwiftyStoreKit.finishTransaction(purchase.transaction)
- }
-
- let appleValidator = AppleReceiptValidator(service: .production, sharedSecret: "your-shared-secret")
- SwiftyStoreKit.verifyReceipt(using: appleValidator) { result in
-
- if case .success(let receipt) = result {
- let purchaseResult = SwiftyStoreKit.verifySubscription(
- ofType: .autoRenewable,
- productId: productId,
- inReceipt: receipt)
-
- switch purchaseResult {
- case .purchased(let expiryDate, let receiptItems):
- print("Product is valid until \(expiryDate)")
- case .expired(let expiryDate, let receiptItems):
- print("Product is expired since \(expiryDate)")
- case .notPurchased:
- print("This product has never been purchased")
- }
-
- } else {
- // receipt verification error
- }
- }
- } else {
- // purchase error
- }
-}
-```
+Further documentation on verifying subscriptions is [available on the wiki](https://github.com/bizz84/SwiftyStoreKit/wiki/Verify-Subscription).
### Subscription Groups
@@ -631,72 +394,13 @@ From [Apple Docs - Offering Subscriptions](https://developer.apple.com/app-store
> A subscription group is a set of in-app purchases that you can create to provide users with a range of content offerings, service levels, or durations to best meet their needs. Users can only buy one subscription within a subscription group at a time. If users would want to buy more that one type of subscription — for example, to subscribe to more than one channel in a streaming app — you can put these in-app purchases in different subscription groups.
-You can verify all subscriptions within the same group with the `verifySubscriptions` method:
-
-```swift
-let appleValidator = AppleReceiptValidator(service: .production, sharedSecret: "your-shared-secret")
-SwiftyStoreKit.verifyReceipt(using: appleValidator) { result in
- switch result {
- case .success(let receipt):
- let productIds = Set([ "com.musevisions.SwiftyStoreKit.Weekly",
- "com.musevisions.SwiftyStoreKit.Monthly",
- "com.musevisions.SwiftyStoreKit.Yearly" ])
- let purchaseResult = SwiftyStoreKit.verifySubscriptions(productIds: productIds, inReceipt: receipt)
- switch purchaseResult {
- case .purchased(let expiryDate, let items):
- print("\(productIds) are valid until \(expiryDate)\n\(items)\n")
- case .expired(let expiryDate, let items):
- print("\(productIds) are expired since \(expiryDate)\n\(items)\n")
- case .notPurchased:
- print("The user has never purchased \(productIds)")
- }
- case .error(let error):
- print("Receipt verification failed: \(error)")
- }
-}
-```
-#### Get distinct purchase identifiers
-
-You can retrieve all product identifiers with the `getDistinctPurchaseIds` method:
-
-```swift
-let appleValidator = AppleReceiptValidator(service: .production, sharedSecret: "your-shared-secret")
-SwiftyStoreKit.verifyReceipt(using: appleValidator) { result in
- switch result {
- case .success(let receipt):
- let productIds = SwiftyStoreKit.getDistinctPurchaseIds(inReceipt receipt: ReceiptInfo)
- let purchaseResult = SwiftyStoreKit.verifySubscriptions(productIds: productIds, inReceipt: receipt)
- switch purchaseResult {
- case .purchased(let expiryDate, let items):
- print("\(productIds) are valid until \(expiryDate)\n\(items)\n")
- case .expired(let expiryDate, let items):
- print("\(productIds) are expired since \(expiryDate)\n\(items)\n")
- case .notPurchased:
- print("The user has never purchased \(productIds)")
- }
- case .error(let error):
- print("Receipt verification failed: \(error)")
- }
-}
-```
+You can verify all subscriptions within the same group with the `verifySubscriptions` method. [Learn more on the wiki](https://github.com/bizz84/SwiftyStoreKit/wiki/Subscription-Groups).
## Notes
The framework provides a simple block based API with robust error handling on top of the existing StoreKit framework. It does **NOT** persist in app purchases data locally. It is up to clients to do this with a storage solution of choice (i.e. NSUserDefaults, CoreData, Keychain).
-#### Swift 2.x / 3.x / 4.x / 5.x
-
-| Language | Branch | Pod version | Xcode version |
-| --------- | ------ | ----------- | ------------- |
-| Swift 5.x | [master](https://github.com/bizz84/SwiftyStoreKit/tree/master) | >= 0.15.0 | Xcode 10.2 or greater|
-| Swift 4.x | [master](https://github.com/bizz84/SwiftyStoreKit/tree/master) | >= 0.10.4 | Xcode 9 or greater|
-| Swift 3.x | [master](https://github.com/bizz84/SwiftyStoreKit/tree/master) | >= 0.5.x | Xcode 8.x |
-| Swift 2.3 | [swift-2.3](https://github.com/bizz84/SwiftyStoreKit/tree/swift-2.3) | 0.4.x | Xcode 8, Xcode 7.3.x |
-| Swift 2.2 | [swift-2.2](https://github.com/bizz84/SwiftyStoreKit/tree/swift-2.2) | 0.3.x | Xcode 7.3.x |
-
-
## Change Log
-
See the [Releases Page](https://github.com/bizz84/SwiftyStoreKit/releases).
## Sample Code
@@ -724,7 +428,6 @@ I have also written about building SwiftyStoreKit on Medium:
* [Maintaining a Growing Open Source Project](https://medium.com/@biz84/maintaining-a-growing-open-source-project-1d385ca84c5#.4cv2g7tdc)
### Troubleshooting
-
* [Apple TN 2413 - Why are my product identifiers being returned in the invalidProductIdentifiers array?](https://developer.apple.com/library/content/technotes/tn2413/_index.html#//apple_ref/doc/uid/DTS40016228-CH1-TROUBLESHOOTING-WHY_ARE_MY_PRODUCT_IDENTIFIERS_BEING_RETURNED_IN_THE_INVALIDPRODUCTIDENTIFIERS_ARRAY_)
* [Invalid Product IDs](http://troybrant.net/blog/2010/01/invalid-product-ids/): Checklist of common mistakes
* [Testing Auto-Renewable Subscriptions on iOS](http://davidbarnard.com/post/164337147440/testing-auto-renewable-subscriptions-on-ios)
@@ -734,11 +437,11 @@ I have also written about building SwiftyStoreKit on Medium:
#### Jared Davidson: In App Purchases! (Swift 3 in Xcode : Swifty Store Kit)
-
+
#### [@rebeloper](https://github.com/rebeloper): Ultimate In-app Purchases Guide
-
+
## Payment flows: implementation details
In order to make a purchase, two operations are needed:
@@ -802,13 +505,3 @@ It would be great to showcase apps using SwiftyStoreKit here. Pull requests welc
* [Hashr](https://apps.apple.com/app/id1166499829) - Generate unique password hashes based on website and master password
A full list of apps is published [on AppSight](https://www.appsight.io/sdk/574154).
-
-## License
-
-Copyright (c) 2015-2018 Andrea Bizzotto bizz84@gmail.com
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.