diff --git a/.jazzy.yaml b/.jazzy.yaml index a2d6903..45c1c8a 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -16,7 +16,6 @@ custom_categories: children: - "Installation" - "Micro Example" - - "License" - name: "Usage" children: - "Initialization" diff --git a/Documentation/Getting Started.md b/Documentation/Getting Started.md index 5f64fb2..fa35897 100644 --- a/Documentation/Getting Started.md +++ b/Documentation/Getting Started.md @@ -1,6 +1,6 @@ If you haven't already, I highly recommend your read the *Overview* and *Preparing* section of Apple's [In-App Purchase official documentation](https://developer.apple.com/in-app-purchase). -## Requirements +# Requirements * Configure your App and Xcode to support In-App Purchases. * [AppStore Connect Setup](https://help.apple.com/app-store-connect/#/devb57be10e7) * Create and configure your [Fovea.Billing](https://billing.fovea.cc/?ref=iap-swift-lib) project account: diff --git a/Documentation/Getting Started/Installation.md b/Documentation/Getting Started/Installation.md index 5a88938..6f01bac 100644 --- a/Documentation/Getting Started/Installation.md +++ b/Documentation/Getting Started/Installation.md @@ -1,14 +1,21 @@ # Installation -

- -

* Select your project in Xcode * Go to the section *Swift Package* * Click on *(+) Add Package Dependency* + +

+ +

+ * Copy the Git URL: *https://github.com/iridescent-dev/iap-swift-lib.git* -* Click on *Next* > *Next* +* Click on *Next* +* In *Rules* select *Version: Up to Next Major ...* +* Click on *Next* + +

+ +

+ * Make sure your project is selected in *Add to target* * Click on *Finish* - -*Note:* You have to `import InAppPurchaseLib` wherever you use the library. diff --git a/Documentation/Getting Started/Micro Example.md b/Documentation/Getting Started/Micro Example.md index 2491fe3..bf4a23a 100644 --- a/Documentation/Getting Started/Micro Example.md +++ b/Documentation/Getting Started/Micro Example.md @@ -20,7 +20,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } func applicationWillTerminate(_ application: UIApplication) { - // Clean + // Stop library when the application will terminate InAppPurchase.stop() } } @@ -71,6 +71,7 @@ class ViewController: UIViewController { } } + // Initiating a purchase @IBAction func purchase(_ sender: Any) { self.loaderView.show() InAppPurchase.purchase( @@ -80,6 +81,7 @@ class ViewController: UIViewController { }) } + // Restoring purchases @IBAction func restorePurchases(_ sender: Any) { self.loaderView.show() InAppPurchase.restorePurchases(callback: { result in diff --git a/Documentation/License.md b/Documentation/License.md deleted file mode 100644 index ce44199..0000000 --- a/Documentation/License.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Iridescent - -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. diff --git a/Documentation/Usage/Displaying products with purchases.md b/Documentation/Usage/Displaying products with purchases.md index 0ec900c..75c11e7 100644 --- a/Documentation/Usage/Displaying products with purchases.md +++ b/Documentation/Usage/Displaying products with purchases.md @@ -1,10 +1,10 @@ # Displaying products with purchases In your store screen, where you present your products titles and prices with a purchase button, there are some cases to handle that we skipped. Owned products and deferred purchases. -### Owned products -Non-consumables and active auto-renewing subscriptions cannot be purchased again. You should adjust your UI to reflect that state. Refer to `InAppPurchase.hasActivePurchase()` to and to the example later in this section. +## Owned products +Non-consumables and active auto-renewing subscriptions cannot be purchased again. You should adjust your UI to reflect that state. Refer to `InAppPurchase.hasActivePurchase()` to the example later in this section. -### Deferred purchases +## Deferred purchases Apple's **Ask to Buy** feature lets parents approve any purchases initiated by children, including in-app purchases. With **Ask to Buy** enabled, when a child requests to make a purchase, the app is notified that the purchase is awaiting the parent’s approval in the purchase callback: @@ -28,7 +28,7 @@ We will use the `hasDeferredTransaction` method: InAppPurchase.hasDeferredTransaction(for productIdentifier: String) -> Bool ``` -### Example +## Example Here's an example that covers what has been discussed above. We will update our example `refreshView` function from before: ``` swift diff --git a/Documentation/Usage/Displaying products.md b/Documentation/Usage/Displaying products.md index 83c71b0..07a4233 100644 --- a/Documentation/Usage/Displaying products.md +++ b/Documentation/Usage/Displaying products.md @@ -1,13 +1,13 @@ # Displaying products Let's start with the simplest case: you have a single product. -You can retrieve all information about this product using the function `InAppPurchase.getProductBy(identifier: "my_product_id")`. This returns an [SKProduct](https://developer.apple.com/documentation/storekit/skproduct) extended with helpful methods. +You can retrieve all information about this product using the function `InAppPurchase.getProductBy(identifier: "my_product_id")`. This returns an [SKProduct](https://developer.apple.com/documentation/storekit/skproduct) extended with [helpful methods](Extensions/SKProduct.html). Those are the most important: - `productIdentifier: String` - The string that identifies the product to the Apple AppStore. - `localizedTitle: String` - The name of the product, in the language of the device, as retrieved from the AppStore. - `localizedDescription: String` - A description of the product, in the language of the device, as retrieved from the AppStore. - - `localizedPrice: String` - The cost of the product in the local currency (_read-only property added by this library_). + - `localizedPrice: String` - The cost of the product in the local currency (_read-only property added by this library, available for OSX >= 10.13.2 and iOS >= 11.2_). *Example*: diff --git a/Documentation/Usage/Displaying subscriptions.md b/Documentation/Usage/Displaying subscriptions.md index 0094c2e..46938b2 100644 --- a/Documentation/Usage/Displaying subscriptions.md +++ b/Documentation/Usage/Displaying subscriptions.md @@ -1,5 +1,13 @@ # Displaying subscriptions -For subscription products, you also have some data about subscription periods and introductory offers. +You can retrieve all information about a product using the function `InAppPurchase.getProductBy(identifier: "my_product_id")`. This returns an [SKProduct](https://developer.apple.com/documentation/storekit/skproduct) extended with [helpful methods](Extensions/SKProduct.html). + +Those are the most important: +- `productIdentifier: String` - The string that identifies the product to the Apple AppStore. +- `localizedTitle: String` - The name of the product, in the language of the device, as retrieved from the AppStore. +- `localizedDescription: String` - A description of the product, in the language of the device, as retrieved from the AppStore. +- `localizedPrice: String` - The cost of the product in the local currency (_read-only property added by this library, available for OSX >= 10.13.2 and iOS >= 11.2_). + +For subscription products, you also have some data about subscription periods and introductory offers. (_read-only property added by this library, available for OSX >= 10.13.2 and iOS >= 11.2_) - `func hasIntroductoryPriceEligible() -> Bool` - The product has an introductory price the user is eligible to. - `localizedSubscriptionPeriod: String?` - The period of the subscription. diff --git a/Documentation/Usage/Purchasing.md b/Documentation/Usage/Purchasing.md index aede98d..2e0853c 100644 --- a/Documentation/Usage/Purchasing.md +++ b/Documentation/Usage/Purchasing.md @@ -11,7 +11,7 @@ That is why the process looks like so: - finalizing transactions when product delivery is complete - sending purchase request, for which successful doesn't always mean complete -### Initiating a purchase +## Initiating a purchase To initiate a purchase, use the `InAppPurchase.purchase()` function. It takes the `productIdentifier` and a `callback` function, called when the purchase has been processed. **Important**: Do not process the purchase here, we'll handle that later! diff --git a/README.md b/README.md index 0331846..3a3f173 100644 --- a/README.md +++ b/README.md @@ -19,104 +19,78 @@ # Getting Started If you haven't already, I highly recommend your read the *Overview* and *Preparing* section of Apple's [In-App Purchase official documentation](https://developer.apple.com/in-app-purchase). +## Requirements +* Configure your App and Xcode to support In-App Purchases. + * [AppStore Connect Setup](https://help.apple.com/app-store-connect/#/devb57be10e7) +* Create and configure your [Fovea.Billing](https://billing.fovea.cc/?ref=iap-swift-lib) project account: + * Set your bundle ID + * The iOS Shared Secret (or shared key) is to be retrieved from [AppStoreConnect](https://appstoreconnect.apple.com/) + * The iOS Subscription Status URL (only if you want subscriptions) + ## Installation * Select your project in Xcode * Go to the section *Swift Package* * Click on *(+) Add Package Dependency* * Copy the Git URL: *https://github.com/iridescent-dev/iap-swift-lib.git* -* Click on *Next* > *Next* +* Click on *Next* +* In *Rules* select *Version: Up to Next Major ...* +* Click on *Next* * Make sure your project is selected in *Add to target* * Click on *Finish* *Note:* You have to `import InAppPurchaseLib` wherever you use the library. -## Micro Example - -```swift -/** AppDelegate.swift */ -import UIKit -import InAppPurchaseLib - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Initialize the library - InAppPurchase.initialize( - iapProducts: [ - IAPProduct(productIdentifier: "my_product", productType: .nonConsumable) - ], - validatorUrlString: "https://validator.fovea.cc/v1/validate?appName=demo&apiKey=12345678" - ) - return true - } - - func applicationWillTerminate(_ application: UIApplication) { - // clean - InAppPurchase.stop() - } +## Basic Usage + +* Initialize the library +``` swift +InAppPurchase.initialize( + iapProducts: [ IAPProduct(productIdentifier: "my_product", productType: .nonConsumable) ], + validatorUrlString: "https://validator.fovea.cc/v1/validate?appName=demo&apiKey=12345678" +) +``` + +* Stop library when the application will terminate +``` swift +func applicationWillTerminate(_ application: UIApplication) { + InAppPurchase.stop() } ``` -```swift -/** ViewController.swift */ -import UIKit -import StoreKit -import InAppPurchaseLib - -class ViewController: UIViewController { - private var loaderView = LoaderView() - @IBOutlet weak var statusLabel: UILabel! - @IBOutlet weak var productTitleLabel: UILabel! - @IBOutlet weak var productDescriptionLabel: UILabel! - @IBOutlet weak var purchaseButton: UIButton! - @IBOutlet weak var restorePurchasesButton: UIButton! - - override func viewDidLoad() { - super.viewDidLoad() - // Add action for purchases and restore butons. - purchaseButton.addTarget(self, action: #selector(self.purchase), for: .touchUpInside) - restorePurchasesButton.addTarget(self, action: #selector(self.restorePurchases), for: .touchUpInside) - } - - override func viewWillAppear(_ animated: Bool) { - self.refreshView() - InAppPurchase.refresh(callback: { _ in - self.refreshView() - }) - } - - func refreshView() { - guard let product: SKProduct = InAppPurchase.getProductBy(identifier: "my_product") else { - self.productTitleLabel.text = "Product unavailable" - return - } - // Display product information. - productTitleLabel.text = product.localizedTitle - productDescriptionLabel.text = product.localizedDescription - purchaseButton.setTitle(product.localizedPrice, for: .normal) - - // Disable the button if the product has already been purchased. - if InAppPurchase.hasActivePurchase(for: "my_product") { - statusLabel.text = "OWNED" - purchaseButton.isPointerInteractionEnabled = false - } - } - - @IBAction func purchase(_ sender: Any) { - self.loaderView.show() - InAppPurchase.purchase( - productIdentifier: "my_product", - callback: { result in - self.loaderView.hide() - }) - } - - @IBAction func restorePurchases(_ sender: Any) { - self.loaderView.show() - InAppPurchase.restorePurchases(callback: { result in +* Display product information +``` swift +guard let product: SKProduct = InAppPurchase.getProductBy(identifier: "my_product") else { return } +productTitleLabel.text = product.localizedTitle +productDescriptionLabel.text = product.localizedDescription +productPriceLabel.text = product.localizedPrice +``` + +* Initialize a purchase +``` swift +@IBAction func purchase(_ sender: Any) { + self.loaderView.show() + InAppPurchase.purchase( + productIdentifier: "my_product", + callback: { result in self.loaderView.hide() }) - } +} +``` + +* Unlock purchased content +``` swift +if InAppPurchase.hasActivePurchase(for: "my_product") { + // display content related to the product +} +``` + +* Restore purchases +``` swift +@IBAction func restorePurchases(_ sender: Any) { + self.loaderView.show() + InAppPurchase.restorePurchases(callback: { result in + self.loaderView.hide() + }) } ``` diff --git a/Sources/InAppPurchaseLib/Common/IAPCallback.swift b/Sources/InAppPurchaseLib/Common/IAPCallback.swift index 0e3309b..4b20011 100644 --- a/Sources/InAppPurchaseLib/Common/IAPCallback.swift +++ b/Sources/InAppPurchaseLib/Common/IAPCallback.swift @@ -13,10 +13,19 @@ public typealias IAPPurchaseCallback = (IAPPurchaseResult) -> Void /// The result returned in the `purchase()` callback. public struct IAPPurchaseResult { + /// The result state. public internal(set) var state: IAPPurchaseResultState + + /// If the state is `failed`, the result can return an `IAPError`. + /// The error occurred during the processing of the purchase by the library. public internal(set) var iapError: IAPError? = nil + + /// If the state is `failed`, the result can return an `SKError`. + /// The error occurred during the processing of the purchase by the App Store. public internal(set) var skError: SKError? = nil + /// If there is an error, return the localized description. + /// - See also: `IAPError` and `SKError`. public var localizedDescription: String? { if skError != nil { return skError!.localizedDescription } if iapError != nil { return iapError!.localizedDescription } @@ -28,10 +37,13 @@ public struct IAPPurchaseResult { public enum IAPPurchaseResultState { /// The purchase was successful. case purchased + /// Puchase failed. case failed + /// The purchase was cancelled by the user. case cancelled + /// The purchase is deferred. case deferred } @@ -41,9 +53,17 @@ public typealias IAPRefreshCallback = (IAPRefreshResult) -> Void /// The result returned in the `refresh()` or `restorePurchases()` callback. public struct IAPRefreshResult { + /// The result state. public internal(set) var state: IAPRefreshResultState + + /// If the state is `failed`, the result can return an `IAPError`. + /// The error occurred during the processing of the purchase by the library. public internal(set) var iapError: IAPError? = nil + + /// If the state is `succeeded`, returns the number of purchases that have been added. public internal(set) var addedPurchases: Int = 0 + + /// If the state is `succeeded`, returns the number of purchases that have been updated. public internal(set) var updatedPurchases: Int = 0 } @@ -51,8 +71,10 @@ public struct IAPRefreshResult { public enum IAPRefreshResultState { /// Refresh was successful. case succeeded + /// Refresh failed. case failed + /// Refresh has been skipped because it is not necessary. case skipped } diff --git a/Sources/InAppPurchaseLib/InAppPurchase.swift b/Sources/InAppPurchaseLib/InAppPurchase.swift index caa0efe..5a12f6d 100644 --- a/Sources/InAppPurchaseLib/InAppPurchase.swift +++ b/Sources/InAppPurchaseLib/InAppPurchase.swift @@ -8,17 +8,17 @@ import Foundation import StoreKit -/// +/// The main class of the library. public class InAppPurchase: NSObject, InAppPurchaseLib { - // InAppPurchaseLib version number. + /// InAppPurchaseLib version number. internal static let versionNumber = "1.0.2" - // The initialize function has been called. + /// The initialize function has been called. internal static var initialized: Bool { return !iapProducts.isEmpty && iapPurchaseDelegate != nil && validatorUrlString != nil } - // Callbacks that are waiting for the refresh. + /// Callbacks that are waiting for the refresh. private static var refreshCallbacks: Array = [] - // The date of the last refresh. + /// The date of the last refresh. private static var lastRefreshDate: Date? = nil diff --git a/Sources/InAppPurchaseLib/InAppPurchaseLib.swift b/Sources/InAppPurchaseLib/InAppPurchaseLib.swift index f1bdbf2..d898c40 100644 --- a/Sources/InAppPurchaseLib/InAppPurchaseLib.swift +++ b/Sources/InAppPurchaseLib/InAppPurchaseLib.swift @@ -25,7 +25,7 @@ public protocol InAppPurchaseLib { /// - iapProducts: An array of `IAPProduct`. /// - validatorUrlString: The validator url retrieved from Fovea. /// - iapPurchaseDelegate: An instance of class that adopts the `IAPPurchaseDelegate` protocol (default value = `DefaultPurchaseDelegate`). - /// - applicationUsername: The user name, if your app implements user login. + /// - applicationUsername: The user name, if your app implements user login (default value = `nil`). static func initialize(iapProducts: Array, validatorUrlString: String, iapPurchaseDelegate: IAPPurchaseDelegate, applicationUsername: String?) -> Void /// Stop observing the payment queue, when the application will terminate, for proper cleanup. @@ -58,7 +58,7 @@ public protocol InAppPurchaseLib { /// Request a Payment from the App Store. /// - Parameters: /// - productIdentifier: The identifier of the product to purchase. - /// - quantity: The quantity to purchase (default value = 1). + /// - quantity: The quantity to purchase (default value = `1`). /// - callback: The function that will be called after processing. /// - See also:`IAPPurchaseResult` static func purchase(productIdentifier: String, quantity: Int, callback: @escaping IAPPurchaseCallback) -> Void @@ -104,12 +104,12 @@ public protocol InAppPurchaseLib { } public extension InAppPurchaseLib { - // Sets default `iapPurchaseDelegate` and `applicationUsername` + /// Sets `DefaultPurchaseDelegate` as default value for `iapPurchaseDelegate` and `nil` for `applicationUsername`. static func initialize(iapProducts: Array, validatorUrlString: String, iapPurchaseDelegate: IAPPurchaseDelegate = DefaultPurchaseDelegate(), applicationUsername: String? = nil) { return initialize(iapProducts: iapProducts, validatorUrlString: validatorUrlString, iapPurchaseDelegate: iapPurchaseDelegate, applicationUsername: applicationUsername) } - // Sets 1 as default value for the quantity. + /// Sets `1` as default value for the `quantity`. static func purchase(productIdentifier: String, quantity: Int = 1, callback: @escaping IAPPurchaseCallback) { return purchase(productIdentifier: productIdentifier, quantity: quantity, callback: callback) } @@ -132,7 +132,7 @@ public class DefaultPurchaseDelegate: IAPPurchaseDelegate { /// Finish the product transactions when a product is newly purchased, updated or restored. /// - Parameter productIdentifier: The identifier of the product. - public func productPurchased(productIdentifier: String) { + public func productPurchased(productIdentifier: String) -> Void { InAppPurchase.finishTransactions(for: productIdentifier) } } diff --git a/Sources/InAppPurchaseLib/Product/IAPProduct.swift b/Sources/InAppPurchaseLib/Product/IAPProduct.swift index 115a87e..d6cbc81 100644 --- a/Sources/InAppPurchaseLib/Product/IAPProduct.swift +++ b/Sources/InAppPurchaseLib/Product/IAPProduct.swift @@ -7,6 +7,7 @@ import Foundation +/// Basic product information used by `InAppPurchase`. public struct IAPProduct { /// The identifier of the product. @@ -27,9 +28,14 @@ public struct IAPProduct { } } +/// Types of in-app purchases. public enum IAPProductType { + /// Consumable in-app purchases are used once, are depleted, and can be purchased again. case consumable + /// Non-consumables are purchased once and do not expire. case nonConsumable + /// This type of subscription does not renew automatically, so users need to renew each time. case nonRenewingSubscription + /// Users are charged on a recurring basis until they decide to cancel. case autoRenewableSubscription } diff --git a/Sources/InAppPurchaseLib/Product/SKProductExtension.swift b/Sources/InAppPurchaseLib/Product/SKProductExtension.swift index d8c61d2..e51eeb4 100644 --- a/Sources/InAppPurchaseLib/Product/SKProductExtension.swift +++ b/Sources/InAppPurchaseLib/Product/SKProductExtension.swift @@ -8,15 +8,21 @@ import Foundation import StoreKit - +/// The format used for the localized subscription periods. public enum IAPPeriodFormat { + /// Remove the number of units if it is equal to 1. + /// Ex: if the period is "1 month", the returned period will be "month". case short + + /// The period will be returned with the number and the unit. + /// Ex: "1 month". case long } @available(OSX 10.13.2, *) @available(iOS 11.2, *) extension SKProduct { + /// The format used for the localized subscription periods. public static var localizedPeriodFormat: IAPPeriodFormat = .short /// Checks if the product has an introductory price the user is eligible to. diff --git a/docs/API documentation.html b/docs/API documentation.html index 70cd86c..09bdafa 100644 --- a/docs/API documentation.html +++ b/docs/API documentation.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

@@ -205,7 +205,8 @@

Errors

- +

The main class of the library.

+ See more
@@ -316,7 +317,7 @@

Declaration

-

Undocumented

+

Basic product information used by InAppPurchase.

See more
@@ -344,7 +345,7 @@

Declaration

-

Undocumented

+

Types of in-app purchases.

See more
@@ -399,7 +400,7 @@

Declaration

-

Undocumented

+

The format used for the localized subscription periods.

See more
diff --git a/docs/Classes/DefaultPurchaseDelegate.html b/docs/Classes/DefaultPurchaseDelegate.html index 5e4025c..838137f 100644 --- a/docs/Classes/DefaultPurchaseDelegate.html +++ b/docs/Classes/DefaultPurchaseDelegate.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

diff --git a/docs/Classes/InAppPurchase.html b/docs/Classes/InAppPurchase.html index 269267c..306e5e0 100644 --- a/docs/Classes/InAppPurchase.html +++ b/docs/Classes/InAppPurchase.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

@@ -168,7 +168,8 @@

InAppPurchase

- +

The main class of the library.

+
diff --git a/docs/Enums/IAPErrorCode.html b/docs/Enums/IAPErrorCode.html index 16f2456..0e6d852 100644 --- a/docs/Enums/IAPErrorCode.html +++ b/docs/Enums/IAPErrorCode.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

diff --git a/docs/Enums/IAPPeriodFormat.html b/docs/Enums/IAPPeriodFormat.html index d2e9a5f..becff06 100644 --- a/docs/Enums/IAPPeriodFormat.html +++ b/docs/Enums/IAPPeriodFormat.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

@@ -168,7 +168,7 @@

IAPPeriodFormat

-

Undocumented

+

The format used for the localized subscription periods.

@@ -190,7 +190,8 @@

IAPPeriodFormat

-

Undocumented

+

Remove the number of units if it is equal to 1. +Ex: if the period is “1 month”, the returned period will be “month”.

@@ -217,7 +218,8 @@

Declaration

-

Undocumented

+

The period will be returned with the number and the unit. +Ex: “1 month”.

diff --git a/docs/Enums/IAPProductType.html b/docs/Enums/IAPProductType.html index 645973d..4cf7513 100644 --- a/docs/Enums/IAPProductType.html +++ b/docs/Enums/IAPProductType.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

@@ -168,7 +168,7 @@

IAPProductType

-

Undocumented

+

Types of in-app purchases.

@@ -190,7 +190,7 @@

IAPProductType

-

Undocumented

+

Consumable in-app purchases are used once, are depleted, and can be purchased again.

@@ -217,7 +217,7 @@

Declaration

-

Undocumented

+

Non-consumables are purchased once and do not expire.

@@ -244,7 +244,7 @@

Declaration

-

Undocumented

+

This type of subscription does not renew automatically, so users need to renew each time.

@@ -271,7 +271,7 @@

Declaration

-

Undocumented

+

Users are charged on a recurring basis until they decide to cancel.

diff --git a/docs/Enums/IAPPurchaseResultState.html b/docs/Enums/IAPPurchaseResultState.html index 42485c4..5c8ea0a 100644 --- a/docs/Enums/IAPPurchaseResultState.html +++ b/docs/Enums/IAPPurchaseResultState.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

diff --git a/docs/Enums/IAPRefreshResultState.html b/docs/Enums/IAPRefreshResultState.html index f9151e4..7442d49 100644 --- a/docs/Enums/IAPRefreshResultState.html +++ b/docs/Enums/IAPRefreshResultState.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

diff --git a/docs/Extensions/SKProduct.html b/docs/Extensions/SKProduct.html index 8fbe59d..4290456 100644 --- a/docs/Extensions/SKProduct.html +++ b/docs/Extensions/SKProduct.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

@@ -189,7 +189,7 @@

SKProduct

-

Undocumented

+

The format used for the localized subscription periods.

diff --git a/docs/Getting Started.html b/docs/Getting Started.html index 717182d..514b505 100644 --- a/docs/Getting Started.html +++ b/docs/Getting Started.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

@@ -163,7 +163,7 @@

Getting Started

If you haven’t already, I highly recommend your read the Overview and Preparing section of Apple’s In-App Purchase official documentation.

-

Requirements

+

Requirements

  • Configure your App and Xcode to support In-App Purchases. diff --git a/docs/Protocols/IAPErrorProtocol.html b/docs/Protocols/IAPErrorProtocol.html index 8c3d780..1ce1550 100644 --- a/docs/Protocols/IAPErrorProtocol.html +++ b/docs/Protocols/IAPErrorProtocol.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/Protocols/IAPPurchaseDelegate.html b/docs/Protocols/IAPPurchaseDelegate.html index 34c6641..ee3c1a4 100644 --- a/docs/Protocols/IAPPurchaseDelegate.html +++ b/docs/Protocols/IAPPurchaseDelegate.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/Protocols/InAppPurchaseLib.html b/docs/Protocols/InAppPurchaseLib.html index cdb81d0..91b2aa6 100644 --- a/docs/Protocols/InAppPurchaseLib.html +++ b/docs/Protocols/InAppPurchaseLib.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -306,7 +306,8 @@

    Declaration

Default Implementation

- +

Sets DefaultPurchaseDelegate as default value for iapPurchaseDelegate and nil for applicationUsername.

+

Declaration

@@ -364,7 +365,7 @@

Parameters

-

The user name, if your app implements user login.

+

The user name, if your app implements user login (default value = nil).

@@ -626,7 +627,8 @@

Return Value

Default Implementation

- +

Sets 1 as default value for the quantity.

+

Declaration

@@ -660,7 +662,7 @@

Parameters

-

The quantity to purchase (default value = 1).

+

The quantity to purchase (default value = 1).

diff --git a/docs/Structs/IAPError.html b/docs/Structs/IAPError.html index 3ce0582..49e575b 100644 --- a/docs/Structs/IAPError.html +++ b/docs/Structs/IAPError.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

diff --git a/docs/Structs/IAPProduct.html b/docs/Structs/IAPProduct.html index f52efcb..214e25a 100644 --- a/docs/Structs/IAPProduct.html +++ b/docs/Structs/IAPProduct.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

@@ -168,7 +168,7 @@

IAPProduct

-

Undocumented

+

Basic product information used by InAppPurchase.

diff --git a/docs/Structs/IAPPurchaseResult.html b/docs/Structs/IAPPurchaseResult.html index d17b2a6..a84c284 100644 --- a/docs/Structs/IAPPurchaseResult.html +++ b/docs/Structs/IAPPurchaseResult.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

@@ -190,7 +190,7 @@

IAPPurchaseResult

-

Undocumented

+

The result state.

@@ -217,7 +217,8 @@

Declaration

-

Undocumented

+

If the state is failed, the result can return an IAPError. +The error occurred during the processing of the purchase by the library.

@@ -244,7 +245,8 @@

Declaration

-

Undocumented

+

If the state is failed, the result can return an SKError. +The error occurred during the processing of the purchase by the App Store.

@@ -271,7 +273,12 @@

Declaration

-

Undocumented

+

If there is an error, return the localized description.

+
+

See

+ See also: IAPError and SKError. + +
diff --git a/docs/Structs/IAPRefreshResult.html b/docs/Structs/IAPRefreshResult.html index 670d0f2..8d51434 100644 --- a/docs/Structs/IAPRefreshResult.html +++ b/docs/Structs/IAPRefreshResult.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

@@ -190,7 +190,7 @@

IAPRefreshResult

-

Undocumented

+

The result state.

@@ -217,7 +217,8 @@

Declaration

-

Undocumented

+

If the state is failed, the result can return an IAPError. +The error occurred during the processing of the purchase by the library.

@@ -244,7 +245,7 @@

Declaration

-

Undocumented

+

If the state is succeeded, returns the number of purchases that have been added.

@@ -271,7 +272,7 @@

Declaration

-

Undocumented

+

If the state is succeeded, returns the number of purchases that have been updated.

diff --git a/docs/Usage.html b/docs/Usage.html index 535a067..832c8f7 100644 --- a/docs/Usage.html +++ b/docs/Usage.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

diff --git a/docs/analytics.html b/docs/analytics.html index 697340d..05416c9 100644 --- a/docs/analytics.html +++ b/docs/analytics.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

diff --git a/docs/badge.svg b/docs/badge.svg index f6985a8..19d671e 100644 --- a/docs/badge.svg +++ b/docs/badge.svg @@ -8,7 +8,7 @@ - + @@ -19,10 +19,10 @@ documentation - 77% + 95% - 77% + 95% diff --git a/docs/displaying-products-with-purchases.html b/docs/displaying-products-with-purchases.html index d77fc40..1cf6105 100644 --- a/docs/displaying-products-with-purchases.html +++ b/docs/displaying-products-with-purchases.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

@@ -164,10 +164,10 @@

Displaying products with purchases

In your store screen, where you present your products titles and prices with a purchase button, there are some cases to handle that we skipped. Owned products and deferred purchases.

-

Owned products

+

Owned products

-

Non-consumables and active auto-renewing subscriptions cannot be purchased again. You should adjust your UI to reflect that state. Refer to InAppPurchase.hasActivePurchase() to and to the example later in this section.

-

Deferred purchases

+

Non-consumables and active auto-renewing subscriptions cannot be purchased again. You should adjust your UI to reflect that state. Refer to InAppPurchase.hasActivePurchase() to the example later in this section.

+

Deferred purchases

Apple’s Ask to Buy feature lets parents approve any purchases initiated by children, including in-app purchases.

@@ -187,7 +187,7 @@

Deferred purchases

We will use the hasDeferredTransaction method:

InAppPurchase.hasDeferredTransaction(for productIdentifier: String) -> Bool
 
-

Example

+

Example

Here’s an example that covers what has been discussed above. We will update our example refreshView function from before:

@objc func refreshView() {
diff --git a/docs/displaying-products.html b/docs/displaying-products.html
index cc50b1f..9413128 100644
--- a/docs/displaying-products.html
+++ b/docs/displaying-products.html
@@ -22,7 +22,7 @@
         
           InAppPurchaseLib documentation
         
-         (77% documented)
+         (95% documented)
       

@@ -165,7 +165,7 @@

Displaying products

Let’s start with the simplest case: you have a single product.

-

You can retrieve all information about this product using the function InAppPurchase.getProductBy(identifier: "my_product_id"). This returns an SKProduct extended with helpful methods.

+

You can retrieve all information about this product using the function InAppPurchase.getProductBy(identifier: "my_product_id"). This returns an SKProduct extended with helpful methods.

Those are the most important:

@@ -173,7 +173,7 @@

Displaying products

  • productIdentifier: String - The string that identifies the product to the Apple AppStore.
  • localizedTitle: String - The name of the product, in the language of the device, as retrieved from the AppStore.
  • localizedDescription: String - A description of the product, in the language of the device, as retrieved from the AppStore.
  • -
  • localizedPrice: String - The cost of the product in the local currency (read-only property added by this library).
  • +
  • localizedPrice: String - The cost of the product in the local currency (read-only property added by this library, available for OSX >= 10.13.2 and iOS >= 11.2).
  • Example:

    diff --git a/docs/displaying-subscriptions.html b/docs/displaying-subscriptions.html index 640c8ff..6d7bbdf 100644 --- a/docs/displaying-subscriptions.html +++ b/docs/displaying-subscriptions.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -163,7 +163,18 @@

    Displaying subscriptions

    -

    For subscription products, you also have some data about subscription periods and introductory offers.

    +

    You can retrieve all information about a product using the function InAppPurchase.getProductBy(identifier: "my_product_id"). This returns an SKProduct extended with helpful methods.

    + +

    Those are the most important:

    + +
      +
    • productIdentifier: String - The string that identifies the product to the Apple AppStore.
    • +
    • localizedTitle: String - The name of the product, in the language of the device, as retrieved from the AppStore.
    • +
    • localizedDescription: String - A description of the product, in the language of the device, as retrieved from the AppStore.
    • +
    • localizedPrice: String - The cost of the product in the local currency (read-only property added by this library, available for OSX >= 10.13.2 and iOS >= 11.2).
    • +
    + +

    For subscription products, you also have some data about subscription periods and introductory offers. (read-only property added by this library, available for OSX >= 10.13.2 and iOS >= 11.2)

    • func hasIntroductoryPriceEligible() -> Bool - The product has an introductory price the user is eligible to.
    • diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/API documentation.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/API documentation.html index 70cd86c..09bdafa 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/API documentation.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/API documentation.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

      @@ -205,7 +205,8 @@

      Errors

      - +

      The main class of the library.

      + See more
      @@ -316,7 +317,7 @@

      Declaration

      -

      Undocumented

      +

      Basic product information used by InAppPurchase.

      See more
      @@ -344,7 +345,7 @@

      Declaration

      -

      Undocumented

      +

      Types of in-app purchases.

      See more
      @@ -399,7 +400,7 @@

      Declaration

      -

      Undocumented

      +

      The format used for the localized subscription periods.

      See more
      diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Classes/DefaultPurchaseDelegate.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Classes/DefaultPurchaseDelegate.html index 5e4025c..838137f 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Classes/DefaultPurchaseDelegate.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Classes/DefaultPurchaseDelegate.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

      diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Classes/InAppPurchase.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Classes/InAppPurchase.html index 269267c..306e5e0 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Classes/InAppPurchase.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Classes/InAppPurchase.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

      @@ -168,7 +168,8 @@

      InAppPurchase

    - +

    The main class of the library.

    +
    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPErrorCode.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPErrorCode.html index 16f2456..0e6d852 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPErrorCode.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPErrorCode.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPPeriodFormat.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPPeriodFormat.html index d2e9a5f..becff06 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPPeriodFormat.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPPeriodFormat.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -168,7 +168,7 @@

    IAPPeriodFormat

    -

    Undocumented

    +

    The format used for the localized subscription periods.

    @@ -190,7 +190,8 @@

    IAPPeriodFormat

    -

    Undocumented

    +

    Remove the number of units if it is equal to 1. +Ex: if the period is “1 month”, the returned period will be “month”.

    @@ -217,7 +218,8 @@

    Declaration

    -

    Undocumented

    +

    The period will be returned with the number and the unit. +Ex: “1 month”.

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPProductType.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPProductType.html index 645973d..4cf7513 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPProductType.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPProductType.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -168,7 +168,7 @@

    IAPProductType

    -

    Undocumented

    +

    Types of in-app purchases.

    @@ -190,7 +190,7 @@

    IAPProductType

    -

    Undocumented

    +

    Consumable in-app purchases are used once, are depleted, and can be purchased again.

    @@ -217,7 +217,7 @@

    Declaration

    -

    Undocumented

    +

    Non-consumables are purchased once and do not expire.

    @@ -244,7 +244,7 @@

    Declaration

    -

    Undocumented

    +

    This type of subscription does not renew automatically, so users need to renew each time.

    @@ -271,7 +271,7 @@

    Declaration

    -

    Undocumented

    +

    Users are charged on a recurring basis until they decide to cancel.

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPPurchaseResultState.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPPurchaseResultState.html index 42485c4..5c8ea0a 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPPurchaseResultState.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPPurchaseResultState.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPRefreshResultState.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPRefreshResultState.html index f9151e4..7442d49 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPRefreshResultState.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Enums/IAPRefreshResultState.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Extensions/SKProduct.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Extensions/SKProduct.html index 8fbe59d..4290456 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Extensions/SKProduct.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Extensions/SKProduct.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -189,7 +189,7 @@

    SKProduct

    -

    Undocumented

    +

    The format used for the localized subscription periods.

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Getting Started.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Getting Started.html index 717182d..514b505 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Getting Started.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Getting Started.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -163,7 +163,7 @@

    Getting Started

    If you haven’t already, I highly recommend your read the Overview and Preparing section of Apple’s In-App Purchase official documentation.

    -

    Requirements

    +

    Requirements

    • Configure your App and Xcode to support In-App Purchases. diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Protocols/IAPErrorProtocol.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Protocols/IAPErrorProtocol.html index 8c3d780..1ce1550 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Protocols/IAPErrorProtocol.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Protocols/IAPErrorProtocol.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

      diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Protocols/IAPPurchaseDelegate.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Protocols/IAPPurchaseDelegate.html index 34c6641..ee3c1a4 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Protocols/IAPPurchaseDelegate.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Protocols/IAPPurchaseDelegate.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

      diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Protocols/InAppPurchaseLib.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Protocols/InAppPurchaseLib.html index cdb81d0..91b2aa6 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Protocols/InAppPurchaseLib.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Protocols/InAppPurchaseLib.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

      @@ -306,7 +306,8 @@

      Declaration

    Default Implementation

    - +

    Sets DefaultPurchaseDelegate as default value for iapPurchaseDelegate and nil for applicationUsername.

    +

    Declaration

    @@ -364,7 +365,7 @@

    Parameters

    -

    The user name, if your app implements user login.

    +

    The user name, if your app implements user login (default value = nil).

    @@ -626,7 +627,8 @@

    Return Value

    Default Implementation

    - +

    Sets 1 as default value for the quantity.

    +

    Declaration

    @@ -660,7 +662,7 @@

    Parameters

    -

    The quantity to purchase (default value = 1).

    +

    The quantity to purchase (default value = 1).

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPError.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPError.html index 3ce0582..49e575b 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPError.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPError.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPProduct.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPProduct.html index f52efcb..214e25a 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPProduct.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPProduct.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -168,7 +168,7 @@

    IAPProduct

    -

    Undocumented

    +

    Basic product information used by InAppPurchase.

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPPurchaseResult.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPPurchaseResult.html index d17b2a6..a84c284 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPPurchaseResult.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPPurchaseResult.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -190,7 +190,7 @@

    IAPPurchaseResult

    -

    Undocumented

    +

    The result state.

    @@ -217,7 +217,8 @@

    Declaration

    -

    Undocumented

    +

    If the state is failed, the result can return an IAPError. +The error occurred during the processing of the purchase by the library.

    @@ -244,7 +245,8 @@

    Declaration

    -

    Undocumented

    +

    If the state is failed, the result can return an SKError. +The error occurred during the processing of the purchase by the App Store.

    @@ -271,7 +273,12 @@

    Declaration

    -

    Undocumented

    +

    If there is an error, return the localized description.

    +
    +

    See

    + See also: IAPError and SKError. + +
    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPRefreshResult.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPRefreshResult.html index 670d0f2..8d51434 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPRefreshResult.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Structs/IAPRefreshResult.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -190,7 +190,7 @@

    IAPRefreshResult

    -

    Undocumented

    +

    The result state.

    @@ -217,7 +217,8 @@

    Declaration

    -

    Undocumented

    +

    If the state is failed, the result can return an IAPError. +The error occurred during the processing of the purchase by the library.

    @@ -244,7 +245,7 @@

    Declaration

    -

    Undocumented

    +

    If the state is succeeded, returns the number of purchases that have been added.

    @@ -271,7 +272,7 @@

    Declaration

    -

    Undocumented

    +

    If the state is succeeded, returns the number of purchases that have been updated.

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Usage.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Usage.html index 535a067..832c8f7 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Usage.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/Usage.html @@ -23,7 +23,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/analytics.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/analytics.html index 697340d..05416c9 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/analytics.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/analytics.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/badge.svg b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/badge.svg index f6985a8..19d671e 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/badge.svg +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/badge.svg @@ -8,7 +8,7 @@ - + @@ -19,10 +19,10 @@ documentation - 77% + 95% - 77% + 95% diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/displaying-products-with-purchases.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/displaying-products-with-purchases.html index d77fc40..1cf6105 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/displaying-products-with-purchases.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/displaying-products-with-purchases.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -164,10 +164,10 @@

    Displaying products with purchases

    In your store screen, where you present your products titles and prices with a purchase button, there are some cases to handle that we skipped. Owned products and deferred purchases.

    -

    Owned products

    +

    Owned products

    -

    Non-consumables and active auto-renewing subscriptions cannot be purchased again. You should adjust your UI to reflect that state. Refer to InAppPurchase.hasActivePurchase() to and to the example later in this section.

    -

    Deferred purchases

    +

    Non-consumables and active auto-renewing subscriptions cannot be purchased again. You should adjust your UI to reflect that state. Refer to InAppPurchase.hasActivePurchase() to the example later in this section.

    +

    Deferred purchases

    Apple’s Ask to Buy feature lets parents approve any purchases initiated by children, including in-app purchases.

    @@ -187,7 +187,7 @@

    Deferred purchases

    We will use the hasDeferredTransaction method:

    InAppPurchase.hasDeferredTransaction(for productIdentifier: String) -> Bool
     
    -

    Example

    +

    Example

    Here’s an example that covers what has been discussed above. We will update our example refreshView function from before:

    @objc func refreshView() {
    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/displaying-products.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/displaying-products.html
    index cc50b1f..9413128 100644
    --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/displaying-products.html
    +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/displaying-products.html
    @@ -22,7 +22,7 @@
             
               InAppPurchaseLib documentation
             
    -         (77% documented)
    +         (95% documented)
           

    @@ -165,7 +165,7 @@

    Displaying products

    Let’s start with the simplest case: you have a single product.

    -

    You can retrieve all information about this product using the function InAppPurchase.getProductBy(identifier: "my_product_id"). This returns an SKProduct extended with helpful methods.

    +

    You can retrieve all information about this product using the function InAppPurchase.getProductBy(identifier: "my_product_id"). This returns an SKProduct extended with helpful methods.

    Those are the most important:

    @@ -173,7 +173,7 @@

    Displaying products

  • productIdentifier: String - The string that identifies the product to the Apple AppStore.
  • localizedTitle: String - The name of the product, in the language of the device, as retrieved from the AppStore.
  • localizedDescription: String - A description of the product, in the language of the device, as retrieved from the AppStore.
  • -
  • localizedPrice: String - The cost of the product in the local currency (read-only property added by this library).
  • +
  • localizedPrice: String - The cost of the product in the local currency (read-only property added by this library, available for OSX >= 10.13.2 and iOS >= 11.2).
  • Example:

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/displaying-subscriptions.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/displaying-subscriptions.html index 640c8ff..6d7bbdf 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/displaying-subscriptions.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/displaying-subscriptions.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -163,7 +163,18 @@

    Displaying subscriptions

    -

    For subscription products, you also have some data about subscription periods and introductory offers.

    +

    You can retrieve all information about a product using the function InAppPurchase.getProductBy(identifier: "my_product_id"). This returns an SKProduct extended with helpful methods.

    + +

    Those are the most important:

    + +
      +
    • productIdentifier: String - The string that identifies the product to the Apple AppStore.
    • +
    • localizedTitle: String - The name of the product, in the language of the device, as retrieved from the AppStore.
    • +
    • localizedDescription: String - A description of the product, in the language of the device, as retrieved from the AppStore.
    • +
    • localizedPrice: String - The cost of the product in the local currency (read-only property added by this library, available for OSX >= 10.13.2 and iOS >= 11.2).
    • +
    + +

    For subscription products, you also have some data about subscription periods and introductory offers. (read-only property added by this library, available for OSX >= 10.13.2 and iOS >= 11.2)

    • func hasIntroductoryPriceEligible() -> Bool - The product has an introductory price the user is eligible to.
    • diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/errors.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/errors.html index 33fa397..c33344b 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/errors.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/errors.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

      diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/handling-purchases.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/handling-purchases.html index 00379e9..78695da 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/handling-purchases.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/handling-purchases.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

      diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/img/ScreenshotInstallation2.png b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/img/ScreenshotInstallation2.png new file mode 100644 index 0000000..88a3ee3 Binary files /dev/null and b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/img/ScreenshotInstallation2.png differ diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/index.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/index.html index a697913..75e6a04 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/index.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/index.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

      @@ -183,6 +183,22 @@

      Features

      Getting Started

      If you haven’t already, I highly recommend your read the Overview and Preparing section of Apple’s In-App Purchase official documentation.

      +

      Requirements

      + +
        +
      • Configure your App and Xcode to support In-App Purchases. + +
      • +
      • Create and configure your Fovea.Billing project account: + +
          +
        • Set your bundle ID
        • +
        • The iOS Shared Secret (or shared key) is to be retrieved from AppStoreConnect
        • +
        • The iOS Subscription Status URL (only if you want subscriptions)
        • +
      • +

      Installation

        @@ -190,97 +206,58 @@

        Installation

      • Go to the section Swift Package
      • Click on (+) Add Package Dependency
      • Copy the Git URL: https://github.com/iridescent-dev/iap-swift-lib.git
      • -
      • Click on Next > Next
      • +
      • Click on Next
      • +
      • In Rules select Version: Up to Next Major …
      • +
      • Click on Next
      • Make sure your project is selected in Add to target
      • Click on Finish

      Note: You have to import InAppPurchaseLib wherever you use the library.

      -

      Micro Example

      -
      /** AppDelegate.swift */
      -import UIKit
      -import InAppPurchaseLib
      -
      -@UIApplicationMain
      -class AppDelegate: UIResponder, UIApplicationDelegate {
      -  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
      -    // Initialize the library
      -    InAppPurchase.initialize(
      -      iapProducts: [
      -        IAPProduct(productIdentifier: "my_product", productType: .nonConsumable)
      -      ],
      -      validatorUrlString: "https://validator.fovea.cc/v1/validate?appName=demo&apiKey=12345678"
      -    )
      -    return true
      -  }
      +

      Basic Usage

      - func applicationWillTerminate(_ application: UIApplication) { - // clean - InAppPurchase.stop() - } +
        +
      • Initialize the library

        +
        InAppPurchase.initialize(
        +iapProducts: [ IAPProduct(productIdentifier: "my_product", productType: .nonConsumable) ],
        +validatorUrlString: "https://validator.fovea.cc/v1/validate?appName=demo&apiKey=12345678"
        +)
        +
      • +
      • Stop library when the application will terminate

        +
        func applicationWillTerminate(_ application: UIApplication) {
        +InAppPurchase.stop()
         }
        -
        -
        /** ViewController.swift */
        -import UIKit
        -import StoreKit
        -import InAppPurchaseLib
        -
        -class ViewController: UIViewController {
        -  private var loaderView = LoaderView()
        -  @IBOutlet weak var statusLabel: UILabel!
        -  @IBOutlet weak var productTitleLabel: UILabel!
        -  @IBOutlet weak var productDescriptionLabel: UILabel!
        -  @IBOutlet weak var purchaseButton: UIButton!
        -  @IBOutlet weak var restorePurchasesButton: UIButton!
        -
        -  override func viewDidLoad() {
        -    super.viewDidLoad()
        -    // Add action for purchases and restore butons.
        -    purchaseButton.addTarget(self, action: #selector(self.purchase), for: .touchUpInside)
        -    restorePurchasesButton.addTarget(self, action: #selector(self.restorePurchases), for: .touchUpInside)
        -  }
        -
        -  override func viewWillAppear(_ animated: Bool) {
        -    self.refreshView()
        -    InAppPurchase.refresh(callback: { _ in
        -      self.refreshView()
        -    })
        -  }
        -
        -  func refreshView() {
        -    guard let product: SKProduct = InAppPurchase.getProductBy(identifier: "my_product") else {
        -      self.productTitleLabel.text = "Product unavailable"
        -      return
        -    }
        -    // Display product information.
        -    productTitleLabel.text = product.localizedTitle
        -    productDescriptionLabel.text = product.localizedDescription
        -    purchaseButton.setTitle(product.localizedPrice, for: .normal)
        -
        -    // Disable the button if the product has already been purchased.
        -    if InAppPurchase.hasActivePurchase(for: "my_product") {
        -      statusLabel.text = "OWNED"
        -      purchaseButton.isPointerInteractionEnabled = false
        -    }
        -  }
        -
        -  @IBAction func purchase(_ sender: Any) {
        -    self.loaderView.show()
        -    InAppPurchase.purchase(
        -      productIdentifier: "my_product",
        -      callback: { result in
        -        self.loaderView.hide()
        -      })
        -  }
        -
        -  @IBAction func restorePurchases(_ sender: Any) {
        -    self.loaderView.show()
        -    InAppPurchase.restorePurchases(callback: { result in
        -      self.loaderView.hide()
        -    })
        -  }
        +
      • +
      • Display product information

        +
        guard let product: SKProduct = InAppPurchase.getProductBy(identifier: "my_product") else { return }
        +productTitleLabel.text = product.localizedTitle
        +productDescriptionLabel.text = product.localizedDescription
        +productPriceLabel.text = product.localizedPrice
        +
      • +
      • Initialize a purchase

        +
        @IBAction func purchase(_ sender: Any) {
        +self.loaderView.show()
        +InAppPurchase.purchase(
        +productIdentifier: "my_product",
        +callback: { result in
        +  self.loaderView.hide()
        +})
         }
        -
        +
      +
    • Unlock purchased content

      +
      if InAppPurchase.hasActivePurchase(for: "my_product") {
      +// display content related to the product
      +}
      +
    • +
    • Restore purchases

      +
      @IBAction func restorePurchases(_ sender: Any) {
      +self.loaderView.show()
      +InAppPurchase.restorePurchases(callback: { result in
      +self.loaderView.hide()
      +})
      +}
      +
    • +

    Documentation

      diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/initialization.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/initialization.html index a87c6e0..a9bfef1 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/initialization.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/initialization.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

      diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/installation.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/installation.html index 690922b..6ac8784 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/installation.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/installation.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

      @@ -163,22 +163,32 @@

      Installation

      -

      - -

      -
      • Select your project in Xcode
      • Go to the section Swift Package
      • Click on (+) Add Package Dependency
      • +
      + +

      + +

      + + + +

      + +

      + +
      • Make sure your project is selected in Add to target
      • Click on Finish
      -

      Note: You have to import InAppPurchaseLib wherever you use the library.

      -
    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/micro-example.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/micro-example.html index 3ae38ac..2b8d48b 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/micro-example.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/micro-example.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -180,7 +180,7 @@

    Micro Example

    } func applicationWillTerminate(_ application: UIApplication) { - // Clean + // Stop library when the application will terminate InAppPurchase.stop() } } @@ -229,6 +229,7 @@

    Micro Example

    } } + // Initiating a purchase @IBAction func purchase(_ sender: Any) { self.loaderView.show() InAppPurchase.purchase( @@ -238,6 +239,7 @@

    Micro Example

    }) } + // Restoring purchases @IBAction func restorePurchases(_ sender: Any) { self.loaderView.show() InAppPurchase.restorePurchases(callback: { result in diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/purchasing.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/purchasing.html index 7a6996c..3e7ceb4 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/purchasing.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/purchasing.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -180,7 +180,7 @@

    Purchasing

  • finalizing transactions when product delivery is complete
  • sending purchase request, for which successful doesn’t always mean complete
  • -

    Initiating a purchase

    +

    Initiating a purchase

    To initiate a purchase, use the InAppPurchase.purchase() function. It takes the productIdentifier and a callback function, called when the purchase has been processed.

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/refreshing.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/refreshing.html index 56e094a..0897f2b 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/refreshing.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/refreshing.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/restoring-purchases.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/restoring-purchases.html index ab44024..b0f5d86 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/restoring-purchases.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/restoring-purchases.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/search.json b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/search.json index ca5875b..cb2b57b 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/search.json +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/search.json @@ -1 +1 @@ -{"Protocols/IAPErrorProtocol.html#/s:16InAppPurchaseLib16IAPErrorProtocolP4codeAA0E4CodeOvp":{"name":"code","abstract":"

    Undocumented

    ","parent_name":"IAPErrorProtocol"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO21libraryNotInitializedyA2CmF":{"name":"libraryNotInitialized","abstract":"

    You must call the initialize fuction before using the library.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO23bundleIdentifierInvalidyA2CmF":{"name":"bundleIdentifierInvalid","abstract":"

    The Bundle Identifier is invalid.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO19validatorUrlInvalidyA2CmF":{"name":"validatorUrlInvalid","abstract":"

    The Validator URL String is invalid.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO20refreshReceiptFailedyA2CmF":{"name":"refreshReceiptFailed","abstract":"

    Failed to refresh the App Store receipt.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO21validateReceiptFailedyA2CmF":{"name":"validateReceiptFailed","abstract":"

    Failed to validate the App Store receipt with Fovea.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO17readReceiptFailedyA2CmF":{"name":"readReceiptFailed","abstract":"

    Failed to read the receipt validation.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO21refreshProductsFailedyA2CmF":{"name":"refreshProductsFailed","abstract":"

    Failed to refresh products from the App Store.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO15productNotFoundyA2CmF":{"name":"productNotFound","abstract":"

    The product was not found on the App Store and cannot be purchased.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO010cannotMakeC0yA2CmF":{"name":"cannotMakePurchase","abstract":"

    The user is not allowed to authorize payments.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO17alreadyPurchasingyA2CmF":{"name":"alreadyPurchasing","abstract":"

    A purchase is already in progress.

    ","parent_name":"IAPErrorCode"},"Structs/IAPError.html#/s:16InAppPurchaseLib8IAPErrorV4codeAA0E4CodeOvp":{"name":"code","abstract":"

    The error code.

    ","parent_name":"IAPError"},"Structs/IAPError.html#/s:16InAppPurchaseLib8IAPErrorV20localizedDescriptionSSvp":{"name":"localizedDescription","abstract":"

    The error description.

    ","parent_name":"IAPError"},"Enums/IAPRefreshResultState.html#/s:16InAppPurchaseLib21IAPRefreshResultStateO9succeededyA2CmF":{"name":"succeeded","abstract":"

    Refresh was successful.

    ","parent_name":"IAPRefreshResultState"},"Enums/IAPRefreshResultState.html#/s:16InAppPurchaseLib21IAPRefreshResultStateO6failedyA2CmF":{"name":"failed","abstract":"

    Refresh failed.

    ","parent_name":"IAPRefreshResultState"},"Enums/IAPRefreshResultState.html#/s:16InAppPurchaseLib21IAPRefreshResultStateO7skippedyA2CmF":{"name":"skipped","abstract":"

    Refresh has been skipped because it is not necessary.

    ","parent_name":"IAPRefreshResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO9purchasedyA2CmF":{"name":"purchased","abstract":"

    The purchase was successful.

    ","parent_name":"IAPPurchaseResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO6failedyA2CmF":{"name":"failed","abstract":"

    Puchase failed.

    ","parent_name":"IAPPurchaseResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO9cancelledyA2CmF":{"name":"cancelled","abstract":"

    The purchase was cancelled by the user.

    ","parent_name":"IAPPurchaseResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO8deferredyA2CmF":{"name":"deferred","abstract":"

    The purchase is deferred.

    ","parent_name":"IAPPurchaseResultState"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV5stateAA0eF5StateOvp":{"name":"state","abstract":"

    Undocumented

    ","parent_name":"IAPRefreshResult"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV8iapErrorAA8IAPErrorVSgvp":{"name":"iapError","abstract":"

    Undocumented

    ","parent_name":"IAPRefreshResult"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV14addedPurchasesSivp":{"name":"addedPurchases","abstract":"

    Undocumented

    ","parent_name":"IAPRefreshResult"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV16updatedPurchasesSivp":{"name":"updatedPurchases","abstract":"

    Undocumented

    ","parent_name":"IAPRefreshResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV5stateAA0eF5StateOvp":{"name":"state","abstract":"

    Undocumented

    ","parent_name":"IAPPurchaseResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV8iapErrorAA8IAPErrorVSgvp":{"name":"iapError","abstract":"

    Undocumented

    ","parent_name":"IAPPurchaseResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV7skErrorSC11SKErrorCodeLeVSgvp":{"name":"skError","abstract":"

    Undocumented

    ","parent_name":"IAPPurchaseResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV20localizedDescriptionSSSgvp":{"name":"localizedDescription","abstract":"

    Undocumented

    ","parent_name":"IAPPurchaseResult"},"Enums/IAPPeriodFormat.html#/s:16InAppPurchaseLib15IAPPeriodFormatO5shortyA2CmF":{"name":"short","abstract":"

    Undocumented

    ","parent_name":"IAPPeriodFormat"},"Enums/IAPPeriodFormat.html#/s:16InAppPurchaseLib15IAPPeriodFormatO4longyA2CmF":{"name":"long","abstract":"

    Undocumented

    ","parent_name":"IAPPeriodFormat"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE21localizedPeriodFormatAC09IAPPeriodH0OvpZ":{"name":"localizedPeriodFormat","abstract":"

    Undocumented

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE28hasIntroductoryPriceEligibleSbyF":{"name":"hasIntroductoryPriceEligible()","abstract":"

    Checks if the product has an introductory price the user is eligible to.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE14localizedPriceSSvp":{"name":"localizedPrice","abstract":"

    Returns a localized string with the cost of the product in the local currency.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE27localizedSubscriptionPeriodSSSgvp":{"name":"localizedSubscriptionPeriod","abstract":"

    Returns a localized string with the period of the subscription product.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE26localizedIntroductoryPriceSSSgvp":{"name":"localizedIntroductoryPrice","abstract":"

    Returns a localized string with the introductory price if available, in the local currency.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE27localizedIntroductoryPeriodSSSgvp":{"name":"localizedIntroductoryPeriod","abstract":"

    Returns a localized string with the introductory price period of the subscription product.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE29localizedIntroductoryDurationSSSgvp":{"name":"localizedIntroductoryDuration","abstract":"

    Returns a localized string with the duration of the introductory price.

    ","parent_name":"SKProduct"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO10consumableyA2CmF":{"name":"consumable","abstract":"

    Undocumented

    ","parent_name":"IAPProductType"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO13nonConsumableyA2CmF":{"name":"nonConsumable","abstract":"

    Undocumented

    ","parent_name":"IAPProductType"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO23nonRenewingSubscriptionyA2CmF":{"name":"nonRenewingSubscription","abstract":"

    Undocumented

    ","parent_name":"IAPProductType"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO25autoRenewableSubscriptionyA2CmF":{"name":"autoRenewableSubscription","abstract":"

    Undocumented

    ","parent_name":"IAPProductType"},"Structs/IAPProduct.html#/s:16InAppPurchaseLib10IAPProductV17productIdentifierSSvp":{"name":"productIdentifier","abstract":"

    The identifier of the product.

    ","parent_name":"IAPProduct"},"Structs/IAPProduct.html#/s:16InAppPurchaseLib10IAPProductV11productTypeAA0eG0Ovp":{"name":"productType","abstract":"

    The type of the product.

    ","parent_name":"IAPProduct"},"Structs/IAPProduct.html#/s:16InAppPurchaseLib10IAPProductV17productIdentifier0F4TypeACSS_AA0eH0Otcfc":{"name":"init(productIdentifier:productType:)","abstract":"

    Initializes an IAPProduct with its identifier and type.

    ","parent_name":"IAPProduct"},"Protocols/IAPPurchaseDelegate.html#/s:16InAppPurchaseLib19IAPPurchaseDelegateP16productPurchased0G10IdentifierySS_tF":{"name":"productPurchased(productIdentifier:)","abstract":"

    Called when a product is newly purchased, updated or restored.

    ","parent_name":"IAPPurchaseDelegate"},"Classes/DefaultPurchaseDelegate.html#/s:16InAppPurchaseLib07DefaultC8DelegateCACycfc":{"name":"init()","abstract":"

    Undocumented

    ","parent_name":"DefaultPurchaseDelegate"},"Classes/DefaultPurchaseDelegate.html#/s:16InAppPurchaseLib07DefaultC8DelegateC16productPurchased0G10IdentifierySS_tF":{"name":"productPurchased(productIdentifier:)","abstract":"

    Finish the product transactions when a product is newly purchased, updated or restored.

    ","parent_name":"DefaultPurchaseDelegate"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP11iapProductsSayAA10IAPProductVGvpZ":{"name":"iapProducts","abstract":"

    The array of IAPProduct.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP18validatorUrlStringSSSgvpZ":{"name":"validatorUrlString","abstract":"

    The validator url retrieved from Fovea.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP03iapC8DelegateAA011IAPPurchaseF0_pSgvpZ":{"name":"iapPurchaseDelegate","abstract":"

    The instance of class that adopts the IAPPurchaseDelegate protocol.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP19applicationUsernameSSSgvpZ":{"name":"applicationUsername","abstract":"

    The user name, if your app implements user login.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP10initialize11iapProducts18validatorUrlString0fC8Delegate19applicationUsernameySayAA10IAPProductVG_SSAA011IAPPurchaseK0_pSSSgtFZ":{"name":"initialize(iapProducts:validatorUrlString:iapPurchaseDelegate:applicationUsername:)","abstract":"

    Start observing the payment queue, as soon as possible, and refresh Product list and user Receipt.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP4stopyyFZ":{"name":"stop()","abstract":"

    Stop observing the payment queue, when the application will terminate, for proper cleanup.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP7refresh8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"refresh(callback:)","abstract":"

    Refresh Product list and user Receipt.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP11getProductsSaySo9SKProductCGyFZ":{"name":"getProducts()","abstract":"

    Gets all products retrieved from the App Store

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP12getProductBy10identifierSo9SKProductCSgSS_tFZ":{"name":"getProductBy(identifier:)","abstract":"

    Gets the product by its identifier from the list of products retrieved from the App Store.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP15canMakePaymentsSbyFZ":{"name":"canMakePayments()","abstract":"

    Checks if the user is allowed to authorize payments.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP8purchase17productIdentifier8quantity8callbackySS_SiyAA17IAPPurchaseResultVctFZ":{"name":"purchase(productIdentifier:quantity:callback:)","abstract":"

    Request a Payment from the App Store.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP16restorePurchases8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"restorePurchases(callback:)","abstract":"

    Restore purchased products.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP18finishTransactions3forySS_tFZ":{"name":"finishTransactions(for:)","abstract":"

    Finish all transactions for the product.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP22hasDeferredTransaction3forSbSS_tFZ":{"name":"hasDeferredTransaction(for:)","abstract":"

    Checks if the last transaction state for a given product was deferred.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP19hasAlreadyPurchasedSbyFZ":{"name":"hasAlreadyPurchased()","abstract":"

    Checks if the user has already purchased at least one product.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP09hasActiveC03forSbSS_tFZ":{"name":"hasActivePurchase(for:)","abstract":"

    Checks if the user currently own (or is subscribed to) a given product (nonConsumable or autoRenewableSubscription).

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP21hasActiveSubscriptionSbyFZ":{"name":"hasActiveSubscription()","abstract":"

    Checks if the user has an active auto renewable subscription regardless of the product identifier.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP03getC4Date3for10Foundation0F0VSgSS_tFZ":{"name":"getPurchaseDate(for:)","abstract":"

    Returns the latest purchased date for a given product.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP13getExpiryDate3for10Foundation0G0VSgSS_tFZ":{"name":"getExpiryDate(for:)","abstract":"

    Returns the expiry date for a subcription. May be past or future.

    ","parent_name":"InAppPurchaseLib"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C11iapProductsSayAA10IAPProductVGvpZ":{"name":"iapProducts","abstract":"

    The array of IAPProduct.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C18validatorUrlStringSSSgvpZ":{"name":"validatorUrlString","abstract":"

    The validator url retrieved from Fovea.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C03iapC8DelegateAA011IAPPurchaseF0_pSgvpZ":{"name":"iapPurchaseDelegate","abstract":"

    The instance of class that adopts the IAPPurchaseDelegate protocol.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C19applicationUsernameSSSgvpZ":{"name":"applicationUsername","abstract":"

    The user name, if your app implements user login.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C10initialize11iapProducts18validatorUrlString0fC8Delegate19applicationUsernameySayAA10IAPProductVG_SSAA011IAPPurchaseK0_pSSSgtFZ":{"name":"initialize(iapProducts:validatorUrlString:iapPurchaseDelegate:applicationUsername:)","abstract":"

    Start observing the payment queue, as soon as possible, and refresh Product list and user Receipt.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C4stopyyFZ":{"name":"stop()","abstract":"

    Stop observing the payment queue, when the application will terminate, for proper cleanup.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C7refresh8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"refresh(callback:)","abstract":"

    Refresh Product list and user Receipt.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C11getProductsSaySo9SKProductCGyFZ":{"name":"getProducts()","abstract":"

    Gets all products retrieved from the App Store

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C12getProductBy10identifierSo9SKProductCSgSS_tFZ":{"name":"getProductBy(identifier:)","abstract":"

    Gets the product by its identifier from the list of products retrieved from the App Store.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C15canMakePaymentsSbyFZ":{"name":"canMakePayments()","abstract":"

    Checks if the user is allowed to authorize payments.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C8purchase17productIdentifier8quantity8callbackySS_SiyAA17IAPPurchaseResultVctFZ":{"name":"purchase(productIdentifier:quantity:callback:)","abstract":"

    Request a Payment from the App Store.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C16restorePurchases8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"restorePurchases(callback:)","abstract":"

    Restore purchased products.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C18finishTransactions3forySS_tFZ":{"name":"finishTransactions(for:)","abstract":"

    Finish all transactions for the product.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C22hasDeferredTransaction3forSbSS_tFZ":{"name":"hasDeferredTransaction(for:)","abstract":"

    Checks if the last transaction state for a given product was deferred.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C19hasAlreadyPurchasedSbyFZ":{"name":"hasAlreadyPurchased()","abstract":"

    Checks if the user has already purchased at least one product.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C09hasActiveC03forSbSS_tFZ":{"name":"hasActivePurchase(for:)","abstract":"

    Checks if the user currently own (or is subscribed to) a given product (nonConsumable or autoRenewableSubscription).

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C21hasActiveSubscriptionSbyFZ":{"name":"hasActiveSubscription()","abstract":"

    Checks if the user has an active auto renewable subscription regardless of the product identifier.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C03getC4Date3for10Foundation0F0VSgSS_tFZ":{"name":"getPurchaseDate(for:)","abstract":"

    Returns the latest purchased date for a given product.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C13getExpiryDate3for10Foundation0G0VSgSS_tFZ":{"name":"getExpiryDate(for:)","abstract":"

    Returns the expiry date for a subcription. May be past or future.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html":{"name":"InAppPurchase"},"Protocols/InAppPurchaseLib.html":{"name":"InAppPurchaseLib","abstract":"

    The protocol that InAppPurchase adopts.

    "},"Classes/DefaultPurchaseDelegate.html":{"name":"DefaultPurchaseDelegate","abstract":"

    The default implementation of IAPPurchaseDelegate if no other is provided. It is enough if you only have non-consumable and/or auto-renewable subscription products.

    "},"Protocols/IAPPurchaseDelegate.html":{"name":"IAPPurchaseDelegate","abstract":"

    The protocol that you must adopt if you have consumable and/or non-renewing subscription products.

    "},"Structs/IAPProduct.html":{"name":"IAPProduct","abstract":"

    Undocumented

    "},"Enums/IAPProductType.html":{"name":"IAPProductType","abstract":"

    Undocumented

    "},"Extensions/SKProduct.html":{"name":"SKProduct"},"Enums/IAPPeriodFormat.html":{"name":"IAPPeriodFormat","abstract":"

    Undocumented

    "},"API%20documentation.html#/s:16InAppPurchaseLib19IAPPurchaseCallbacka":{"name":"IAPPurchaseCallback","abstract":"

    Undocumented

    "},"API%20documentation.html#/s:16InAppPurchaseLib18IAPRefreshCallbacka":{"name":"IAPRefreshCallback","abstract":"

    Undocumented

    "},"Structs/IAPPurchaseResult.html":{"name":"IAPPurchaseResult","abstract":"

    The result returned in the purchase() callback.

    "},"Structs/IAPRefreshResult.html":{"name":"IAPRefreshResult","abstract":"

    The result returned in the refresh() or restorePurchases() callback.

    "},"Enums/IAPPurchaseResultState.html":{"name":"IAPPurchaseResultState","abstract":"

    The list of the different states of the IAPPurchaseResult.

    "},"Enums/IAPRefreshResultState.html":{"name":"IAPRefreshResultState","abstract":"

    The list of the different states of the IAPRefreshResult.

    "},"Structs/IAPError.html":{"name":"IAPError","abstract":"

    When calling refresh(), purchase() or restorePurchases(), the callback can return an IAPError if the state is failed.

    "},"Enums/IAPErrorCode.html":{"name":"IAPErrorCode","abstract":"

    The list of error codes that can be returned by the library.

    "},"Protocols/IAPErrorProtocol.html":{"name":"IAPErrorProtocol","abstract":"

    Undocumented

    "},"initialization.html":{"name":"Initialization"},"displaying-products.html":{"name":"Displaying products"},"displaying-subscriptions.html":{"name":"Displaying subscriptions"},"refreshing.html":{"name":"Refreshing"},"purchasing.html":{"name":"Purchasing"},"handling-purchases.html":{"name":"Handling purchases"},"restoring-purchases.html":{"name":"Restoring purchases"},"displaying-products-with-purchases.html":{"name":"Displaying products with purchases"},"errors.html":{"name":"Errors"},"analytics.html":{"name":"Analytics"},"server-integration.html":{"name":"Server integration"},"installation.html":{"name":"Installation"},"micro-example.html":{"name":"Micro Example"},"Getting%20Started.html":{"name":"Getting Started"},"Usage.html":{"name":"Usage"},"API%20documentation.html":{"name":"API documentation"}} \ No newline at end of file +{"Protocols/IAPErrorProtocol.html#/s:16InAppPurchaseLib16IAPErrorProtocolP4codeAA0E4CodeOvp":{"name":"code","abstract":"

    Undocumented

    ","parent_name":"IAPErrorProtocol"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO21libraryNotInitializedyA2CmF":{"name":"libraryNotInitialized","abstract":"

    You must call the initialize fuction before using the library.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO23bundleIdentifierInvalidyA2CmF":{"name":"bundleIdentifierInvalid","abstract":"

    The Bundle Identifier is invalid.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO19validatorUrlInvalidyA2CmF":{"name":"validatorUrlInvalid","abstract":"

    The Validator URL String is invalid.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO20refreshReceiptFailedyA2CmF":{"name":"refreshReceiptFailed","abstract":"

    Failed to refresh the App Store receipt.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO21validateReceiptFailedyA2CmF":{"name":"validateReceiptFailed","abstract":"

    Failed to validate the App Store receipt with Fovea.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO17readReceiptFailedyA2CmF":{"name":"readReceiptFailed","abstract":"

    Failed to read the receipt validation.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO21refreshProductsFailedyA2CmF":{"name":"refreshProductsFailed","abstract":"

    Failed to refresh products from the App Store.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO15productNotFoundyA2CmF":{"name":"productNotFound","abstract":"

    The product was not found on the App Store and cannot be purchased.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO010cannotMakeC0yA2CmF":{"name":"cannotMakePurchase","abstract":"

    The user is not allowed to authorize payments.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO17alreadyPurchasingyA2CmF":{"name":"alreadyPurchasing","abstract":"

    A purchase is already in progress.

    ","parent_name":"IAPErrorCode"},"Structs/IAPError.html#/s:16InAppPurchaseLib8IAPErrorV4codeAA0E4CodeOvp":{"name":"code","abstract":"

    The error code.

    ","parent_name":"IAPError"},"Structs/IAPError.html#/s:16InAppPurchaseLib8IAPErrorV20localizedDescriptionSSvp":{"name":"localizedDescription","abstract":"

    The error description.

    ","parent_name":"IAPError"},"Enums/IAPRefreshResultState.html#/s:16InAppPurchaseLib21IAPRefreshResultStateO9succeededyA2CmF":{"name":"succeeded","abstract":"

    Refresh was successful.

    ","parent_name":"IAPRefreshResultState"},"Enums/IAPRefreshResultState.html#/s:16InAppPurchaseLib21IAPRefreshResultStateO6failedyA2CmF":{"name":"failed","abstract":"

    Refresh failed.

    ","parent_name":"IAPRefreshResultState"},"Enums/IAPRefreshResultState.html#/s:16InAppPurchaseLib21IAPRefreshResultStateO7skippedyA2CmF":{"name":"skipped","abstract":"

    Refresh has been skipped because it is not necessary.

    ","parent_name":"IAPRefreshResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO9purchasedyA2CmF":{"name":"purchased","abstract":"

    The purchase was successful.

    ","parent_name":"IAPPurchaseResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO6failedyA2CmF":{"name":"failed","abstract":"

    Puchase failed.

    ","parent_name":"IAPPurchaseResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO9cancelledyA2CmF":{"name":"cancelled","abstract":"

    The purchase was cancelled by the user.

    ","parent_name":"IAPPurchaseResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO8deferredyA2CmF":{"name":"deferred","abstract":"

    The purchase is deferred.

    ","parent_name":"IAPPurchaseResultState"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV5stateAA0eF5StateOvp":{"name":"state","abstract":"

    The result state.

    ","parent_name":"IAPRefreshResult"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV8iapErrorAA8IAPErrorVSgvp":{"name":"iapError","abstract":"

    If the state is failed, the result can return an IAPError.","parent_name":"IAPRefreshResult"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV14addedPurchasesSivp":{"name":"addedPurchases","abstract":"

    If the state is succeeded, returns the number of purchases that have been added.

    ","parent_name":"IAPRefreshResult"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV16updatedPurchasesSivp":{"name":"updatedPurchases","abstract":"

    If the state is succeeded, returns the number of purchases that have been updated.

    ","parent_name":"IAPRefreshResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV5stateAA0eF5StateOvp":{"name":"state","abstract":"

    The result state.

    ","parent_name":"IAPPurchaseResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV8iapErrorAA8IAPErrorVSgvp":{"name":"iapError","abstract":"

    If the state is failed, the result can return an IAPError.","parent_name":"IAPPurchaseResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV7skErrorSC11SKErrorCodeLeVSgvp":{"name":"skError","abstract":"

    If the state is failed, the result can return an SKError.","parent_name":"IAPPurchaseResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV20localizedDescriptionSSSgvp":{"name":"localizedDescription","abstract":"

    If there is an error, return the localized description.

    ","parent_name":"IAPPurchaseResult"},"Enums/IAPPeriodFormat.html#/s:16InAppPurchaseLib15IAPPeriodFormatO5shortyA2CmF":{"name":"short","abstract":"

    Remove the number of units if it is equal to 1.","parent_name":"IAPPeriodFormat"},"Enums/IAPPeriodFormat.html#/s:16InAppPurchaseLib15IAPPeriodFormatO4longyA2CmF":{"name":"long","abstract":"

    The period will be returned with the number and the unit.","parent_name":"IAPPeriodFormat"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE21localizedPeriodFormatAC09IAPPeriodH0OvpZ":{"name":"localizedPeriodFormat","abstract":"

    The format used for the localized subscription periods.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE28hasIntroductoryPriceEligibleSbyF":{"name":"hasIntroductoryPriceEligible()","abstract":"

    Checks if the product has an introductory price the user is eligible to.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE14localizedPriceSSvp":{"name":"localizedPrice","abstract":"

    Returns a localized string with the cost of the product in the local currency.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE27localizedSubscriptionPeriodSSSgvp":{"name":"localizedSubscriptionPeriod","abstract":"

    Returns a localized string with the period of the subscription product.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE26localizedIntroductoryPriceSSSgvp":{"name":"localizedIntroductoryPrice","abstract":"

    Returns a localized string with the introductory price if available, in the local currency.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE27localizedIntroductoryPeriodSSSgvp":{"name":"localizedIntroductoryPeriod","abstract":"

    Returns a localized string with the introductory price period of the subscription product.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE29localizedIntroductoryDurationSSSgvp":{"name":"localizedIntroductoryDuration","abstract":"

    Returns a localized string with the duration of the introductory price.

    ","parent_name":"SKProduct"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO10consumableyA2CmF":{"name":"consumable","abstract":"

    Consumable in-app purchases are used once, are depleted, and can be purchased again.

    ","parent_name":"IAPProductType"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO13nonConsumableyA2CmF":{"name":"nonConsumable","abstract":"

    Non-consumables are purchased once and do not expire.

    ","parent_name":"IAPProductType"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO23nonRenewingSubscriptionyA2CmF":{"name":"nonRenewingSubscription","abstract":"

    This type of subscription does not renew automatically, so users need to renew each time.

    ","parent_name":"IAPProductType"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO25autoRenewableSubscriptionyA2CmF":{"name":"autoRenewableSubscription","abstract":"

    Users are charged on a recurring basis until they decide to cancel.

    ","parent_name":"IAPProductType"},"Structs/IAPProduct.html#/s:16InAppPurchaseLib10IAPProductV17productIdentifierSSvp":{"name":"productIdentifier","abstract":"

    The identifier of the product.

    ","parent_name":"IAPProduct"},"Structs/IAPProduct.html#/s:16InAppPurchaseLib10IAPProductV11productTypeAA0eG0Ovp":{"name":"productType","abstract":"

    The type of the product.

    ","parent_name":"IAPProduct"},"Structs/IAPProduct.html#/s:16InAppPurchaseLib10IAPProductV17productIdentifier0F4TypeACSS_AA0eH0Otcfc":{"name":"init(productIdentifier:productType:)","abstract":"

    Initializes an IAPProduct with its identifier and type.

    ","parent_name":"IAPProduct"},"Protocols/IAPPurchaseDelegate.html#/s:16InAppPurchaseLib19IAPPurchaseDelegateP16productPurchased0G10IdentifierySS_tF":{"name":"productPurchased(productIdentifier:)","abstract":"

    Called when a product is newly purchased, updated or restored.

    ","parent_name":"IAPPurchaseDelegate"},"Classes/DefaultPurchaseDelegate.html#/s:16InAppPurchaseLib07DefaultC8DelegateCACycfc":{"name":"init()","abstract":"

    Undocumented

    ","parent_name":"DefaultPurchaseDelegate"},"Classes/DefaultPurchaseDelegate.html#/s:16InAppPurchaseLib07DefaultC8DelegateC16productPurchased0G10IdentifierySS_tF":{"name":"productPurchased(productIdentifier:)","abstract":"

    Finish the product transactions when a product is newly purchased, updated or restored.

    ","parent_name":"DefaultPurchaseDelegate"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP11iapProductsSayAA10IAPProductVGvpZ":{"name":"iapProducts","abstract":"

    The array of IAPProduct.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP18validatorUrlStringSSSgvpZ":{"name":"validatorUrlString","abstract":"

    The validator url retrieved from Fovea.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP03iapC8DelegateAA011IAPPurchaseF0_pSgvpZ":{"name":"iapPurchaseDelegate","abstract":"

    The instance of class that adopts the IAPPurchaseDelegate protocol.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP19applicationUsernameSSSgvpZ":{"name":"applicationUsername","abstract":"

    The user name, if your app implements user login.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP10initialize11iapProducts18validatorUrlString0fC8Delegate19applicationUsernameySayAA10IAPProductVG_SSAA011IAPPurchaseK0_pSSSgtFZ":{"name":"initialize(iapProducts:validatorUrlString:iapPurchaseDelegate:applicationUsername:)","abstract":"

    Start observing the payment queue, as soon as possible, and refresh Product list and user Receipt.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP4stopyyFZ":{"name":"stop()","abstract":"

    Stop observing the payment queue, when the application will terminate, for proper cleanup.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP7refresh8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"refresh(callback:)","abstract":"

    Refresh Product list and user Receipt.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP11getProductsSaySo9SKProductCGyFZ":{"name":"getProducts()","abstract":"

    Gets all products retrieved from the App Store

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP12getProductBy10identifierSo9SKProductCSgSS_tFZ":{"name":"getProductBy(identifier:)","abstract":"

    Gets the product by its identifier from the list of products retrieved from the App Store.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP15canMakePaymentsSbyFZ":{"name":"canMakePayments()","abstract":"

    Checks if the user is allowed to authorize payments.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP8purchase17productIdentifier8quantity8callbackySS_SiyAA17IAPPurchaseResultVctFZ":{"name":"purchase(productIdentifier:quantity:callback:)","abstract":"

    Request a Payment from the App Store.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP16restorePurchases8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"restorePurchases(callback:)","abstract":"

    Restore purchased products.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP18finishTransactions3forySS_tFZ":{"name":"finishTransactions(for:)","abstract":"

    Finish all transactions for the product.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP22hasDeferredTransaction3forSbSS_tFZ":{"name":"hasDeferredTransaction(for:)","abstract":"

    Checks if the last transaction state for a given product was deferred.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP19hasAlreadyPurchasedSbyFZ":{"name":"hasAlreadyPurchased()","abstract":"

    Checks if the user has already purchased at least one product.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP09hasActiveC03forSbSS_tFZ":{"name":"hasActivePurchase(for:)","abstract":"

    Checks if the user currently own (or is subscribed to) a given product (nonConsumable or autoRenewableSubscription).

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP21hasActiveSubscriptionSbyFZ":{"name":"hasActiveSubscription()","abstract":"

    Checks if the user has an active auto renewable subscription regardless of the product identifier.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP03getC4Date3for10Foundation0F0VSgSS_tFZ":{"name":"getPurchaseDate(for:)","abstract":"

    Returns the latest purchased date for a given product.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP13getExpiryDate3for10Foundation0G0VSgSS_tFZ":{"name":"getExpiryDate(for:)","abstract":"

    Returns the expiry date for a subcription. May be past or future.

    ","parent_name":"InAppPurchaseLib"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C11iapProductsSayAA10IAPProductVGvpZ":{"name":"iapProducts","abstract":"

    The array of IAPProduct.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C18validatorUrlStringSSSgvpZ":{"name":"validatorUrlString","abstract":"

    The validator url retrieved from Fovea.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C03iapC8DelegateAA011IAPPurchaseF0_pSgvpZ":{"name":"iapPurchaseDelegate","abstract":"

    The instance of class that adopts the IAPPurchaseDelegate protocol.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C19applicationUsernameSSSgvpZ":{"name":"applicationUsername","abstract":"

    The user name, if your app implements user login.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C10initialize11iapProducts18validatorUrlString0fC8Delegate19applicationUsernameySayAA10IAPProductVG_SSAA011IAPPurchaseK0_pSSSgtFZ":{"name":"initialize(iapProducts:validatorUrlString:iapPurchaseDelegate:applicationUsername:)","abstract":"

    Start observing the payment queue, as soon as possible, and refresh Product list and user Receipt.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C4stopyyFZ":{"name":"stop()","abstract":"

    Stop observing the payment queue, when the application will terminate, for proper cleanup.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C7refresh8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"refresh(callback:)","abstract":"

    Refresh Product list and user Receipt.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C11getProductsSaySo9SKProductCGyFZ":{"name":"getProducts()","abstract":"

    Gets all products retrieved from the App Store

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C12getProductBy10identifierSo9SKProductCSgSS_tFZ":{"name":"getProductBy(identifier:)","abstract":"

    Gets the product by its identifier from the list of products retrieved from the App Store.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C15canMakePaymentsSbyFZ":{"name":"canMakePayments()","abstract":"

    Checks if the user is allowed to authorize payments.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C8purchase17productIdentifier8quantity8callbackySS_SiyAA17IAPPurchaseResultVctFZ":{"name":"purchase(productIdentifier:quantity:callback:)","abstract":"

    Request a Payment from the App Store.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C16restorePurchases8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"restorePurchases(callback:)","abstract":"

    Restore purchased products.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C18finishTransactions3forySS_tFZ":{"name":"finishTransactions(for:)","abstract":"

    Finish all transactions for the product.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C22hasDeferredTransaction3forSbSS_tFZ":{"name":"hasDeferredTransaction(for:)","abstract":"

    Checks if the last transaction state for a given product was deferred.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C19hasAlreadyPurchasedSbyFZ":{"name":"hasAlreadyPurchased()","abstract":"

    Checks if the user has already purchased at least one product.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C09hasActiveC03forSbSS_tFZ":{"name":"hasActivePurchase(for:)","abstract":"

    Checks if the user currently own (or is subscribed to) a given product (nonConsumable or autoRenewableSubscription).

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C21hasActiveSubscriptionSbyFZ":{"name":"hasActiveSubscription()","abstract":"

    Checks if the user has an active auto renewable subscription regardless of the product identifier.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C03getC4Date3for10Foundation0F0VSgSS_tFZ":{"name":"getPurchaseDate(for:)","abstract":"

    Returns the latest purchased date for a given product.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C13getExpiryDate3for10Foundation0G0VSgSS_tFZ":{"name":"getExpiryDate(for:)","abstract":"

    Returns the expiry date for a subcription. May be past or future.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html":{"name":"InAppPurchase","abstract":"

    The main class of the library.

    "},"Protocols/InAppPurchaseLib.html":{"name":"InAppPurchaseLib","abstract":"

    The protocol that InAppPurchase adopts.

    "},"Classes/DefaultPurchaseDelegate.html":{"name":"DefaultPurchaseDelegate","abstract":"

    The default implementation of IAPPurchaseDelegate if no other is provided. It is enough if you only have non-consumable and/or auto-renewable subscription products.

    "},"Protocols/IAPPurchaseDelegate.html":{"name":"IAPPurchaseDelegate","abstract":"

    The protocol that you must adopt if you have consumable and/or non-renewing subscription products.

    "},"Structs/IAPProduct.html":{"name":"IAPProduct","abstract":"

    Basic product information used by InAppPurchase.

    "},"Enums/IAPProductType.html":{"name":"IAPProductType","abstract":"

    Types of in-app purchases.

    "},"Extensions/SKProduct.html":{"name":"SKProduct"},"Enums/IAPPeriodFormat.html":{"name":"IAPPeriodFormat","abstract":"

    The format used for the localized subscription periods.

    "},"API%20documentation.html#/s:16InAppPurchaseLib19IAPPurchaseCallbacka":{"name":"IAPPurchaseCallback","abstract":"

    Undocumented

    "},"API%20documentation.html#/s:16InAppPurchaseLib18IAPRefreshCallbacka":{"name":"IAPRefreshCallback","abstract":"

    Undocumented

    "},"Structs/IAPPurchaseResult.html":{"name":"IAPPurchaseResult","abstract":"

    The result returned in the purchase() callback.

    "},"Structs/IAPRefreshResult.html":{"name":"IAPRefreshResult","abstract":"

    The result returned in the refresh() or restorePurchases() callback.

    "},"Enums/IAPPurchaseResultState.html":{"name":"IAPPurchaseResultState","abstract":"

    The list of the different states of the IAPPurchaseResult.

    "},"Enums/IAPRefreshResultState.html":{"name":"IAPRefreshResultState","abstract":"

    The list of the different states of the IAPRefreshResult.

    "},"Structs/IAPError.html":{"name":"IAPError","abstract":"

    When calling refresh(), purchase() or restorePurchases(), the callback can return an IAPError if the state is failed.

    "},"Enums/IAPErrorCode.html":{"name":"IAPErrorCode","abstract":"

    The list of error codes that can be returned by the library.

    "},"Protocols/IAPErrorProtocol.html":{"name":"IAPErrorProtocol","abstract":"

    Undocumented

    "},"initialization.html":{"name":"Initialization"},"displaying-products.html":{"name":"Displaying products"},"displaying-subscriptions.html":{"name":"Displaying subscriptions"},"refreshing.html":{"name":"Refreshing"},"purchasing.html":{"name":"Purchasing"},"handling-purchases.html":{"name":"Handling purchases"},"restoring-purchases.html":{"name":"Restoring purchases"},"displaying-products-with-purchases.html":{"name":"Displaying products with purchases"},"errors.html":{"name":"Errors"},"analytics.html":{"name":"Analytics"},"server-integration.html":{"name":"Server integration"},"installation.html":{"name":"Installation"},"micro-example.html":{"name":"Micro Example"},"Getting%20Started.html":{"name":"Getting Started"},"Usage.html":{"name":"Usage"},"API%20documentation.html":{"name":"API documentation"}} \ No newline at end of file diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/server-integration.html b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/server-integration.html index ab51e7d..3a3900d 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/server-integration.html +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/server-integration.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/undocumented.json b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/undocumented.json index f5e8bed..6522d6d 100644 --- a/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/undocumented.json +++ b/docs/docsets/InAppPurchaseLib.docset/Contents/Resources/Documents/undocumented.json @@ -9,67 +9,11 @@ }, { "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 16, - "symbol": "IAPPurchaseResult.state", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 17, - "symbol": "IAPPurchaseResult.iapError", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 18, - "symbol": "IAPPurchaseResult.skError", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 20, - "symbol": "IAPPurchaseResult.localizedDescription", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 40, + "line": 52, "symbol": "IAPRefreshCallback", "symbol_kind": "source.lang.swift.decl.typealias", "warning": "undocumented" }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 44, - "symbol": "IAPRefreshResult.state", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 45, - "symbol": "IAPRefreshResult.iapError", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 46, - "symbol": "IAPRefreshResult.addedPurchases", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 47, - "symbol": "IAPRefreshResult.updatedPurchases", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, { "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPError.swift", "line": 11, @@ -90,76 +34,6 @@ "symbol": "DefaultPurchaseDelegate.init()", "symbol_kind": "source.lang.swift.decl.function.method.instance", "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/IAPProduct.swift", - "line": 10, - "symbol": "IAPProduct", - "symbol_kind": "source.lang.swift.decl.struct", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/IAPProduct.swift", - "line": 30, - "symbol": "IAPProductType", - "symbol_kind": "source.lang.swift.decl.enum", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/IAPProduct.swift", - "line": 31, - "symbol": "IAPProductType.consumable", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/IAPProduct.swift", - "line": 32, - "symbol": "IAPProductType.nonConsumable", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/IAPProduct.swift", - "line": 33, - "symbol": "IAPProductType.nonRenewingSubscription", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/IAPProduct.swift", - "line": 34, - "symbol": "IAPProductType.autoRenewableSubscription", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/SKProductExtension.swift", - "line": 12, - "symbol": "IAPPeriodFormat", - "symbol_kind": "source.lang.swift.decl.enum", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/SKProductExtension.swift", - "line": 13, - "symbol": "IAPPeriodFormat.short", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/SKProductExtension.swift", - "line": 14, - "symbol": "IAPPeriodFormat.long", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/SKProductExtension.swift", - "line": 20, - "symbol": "SKProduct.localizedPeriodFormat", - "symbol_kind": "source.lang.swift.decl.var.static", - "warning": "undocumented" } ], "source_directory": "/Users/veronique/Documents/iap-swift-lib" diff --git a/docs/docsets/InAppPurchaseLib.tgz b/docs/docsets/InAppPurchaseLib.tgz index 366b983..25c6e9e 100644 Binary files a/docs/docsets/InAppPurchaseLib.tgz and b/docs/docsets/InAppPurchaseLib.tgz differ diff --git a/docs/errors.html b/docs/errors.html index 33fa397..c33344b 100644 --- a/docs/errors.html +++ b/docs/errors.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/handling-purchases.html b/docs/handling-purchases.html index 00379e9..78695da 100644 --- a/docs/handling-purchases.html +++ b/docs/handling-purchases.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/img/ScreenshotInstallation2.png b/docs/img/ScreenshotInstallation2.png new file mode 100644 index 0000000..88a3ee3 Binary files /dev/null and b/docs/img/ScreenshotInstallation2.png differ diff --git a/docs/index.html b/docs/index.html index a697913..75e6a04 100644 --- a/docs/index.html +++ b/docs/index.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -183,6 +183,22 @@

    Features

    Getting Started

    If you haven’t already, I highly recommend your read the Overview and Preparing section of Apple’s In-App Purchase official documentation.

    +

    Requirements

    + +
      +
    • Configure your App and Xcode to support In-App Purchases. + +
    • +
    • Create and configure your Fovea.Billing project account: + +
        +
      • Set your bundle ID
      • +
      • The iOS Shared Secret (or shared key) is to be retrieved from AppStoreConnect
      • +
      • The iOS Subscription Status URL (only if you want subscriptions)
      • +
    • +

    Installation

      @@ -190,97 +206,58 @@

      Installation

    • Go to the section Swift Package
    • Click on (+) Add Package Dependency
    • Copy the Git URL: https://github.com/iridescent-dev/iap-swift-lib.git
    • -
    • Click on Next > Next
    • +
    • Click on Next
    • +
    • In Rules select Version: Up to Next Major …
    • +
    • Click on Next
    • Make sure your project is selected in Add to target
    • Click on Finish

    Note: You have to import InAppPurchaseLib wherever you use the library.

    -

    Micro Example

    -
    /** AppDelegate.swift */
    -import UIKit
    -import InAppPurchaseLib
    -
    -@UIApplicationMain
    -class AppDelegate: UIResponder, UIApplicationDelegate {
    -  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    -    // Initialize the library
    -    InAppPurchase.initialize(
    -      iapProducts: [
    -        IAPProduct(productIdentifier: "my_product", productType: .nonConsumable)
    -      ],
    -      validatorUrlString: "https://validator.fovea.cc/v1/validate?appName=demo&apiKey=12345678"
    -    )
    -    return true
    -  }
    +

    Basic Usage

    - func applicationWillTerminate(_ application: UIApplication) { - // clean - InAppPurchase.stop() - } +
      +
    • Initialize the library

      +
      InAppPurchase.initialize(
      +iapProducts: [ IAPProduct(productIdentifier: "my_product", productType: .nonConsumable) ],
      +validatorUrlString: "https://validator.fovea.cc/v1/validate?appName=demo&apiKey=12345678"
      +)
      +
    • +
    • Stop library when the application will terminate

      +
      func applicationWillTerminate(_ application: UIApplication) {
      +InAppPurchase.stop()
       }
      -
      -
      /** ViewController.swift */
      -import UIKit
      -import StoreKit
      -import InAppPurchaseLib
      -
      -class ViewController: UIViewController {
      -  private var loaderView = LoaderView()
      -  @IBOutlet weak var statusLabel: UILabel!
      -  @IBOutlet weak var productTitleLabel: UILabel!
      -  @IBOutlet weak var productDescriptionLabel: UILabel!
      -  @IBOutlet weak var purchaseButton: UIButton!
      -  @IBOutlet weak var restorePurchasesButton: UIButton!
      -
      -  override func viewDidLoad() {
      -    super.viewDidLoad()
      -    // Add action for purchases and restore butons.
      -    purchaseButton.addTarget(self, action: #selector(self.purchase), for: .touchUpInside)
      -    restorePurchasesButton.addTarget(self, action: #selector(self.restorePurchases), for: .touchUpInside)
      -  }
      -
      -  override func viewWillAppear(_ animated: Bool) {
      -    self.refreshView()
      -    InAppPurchase.refresh(callback: { _ in
      -      self.refreshView()
      -    })
      -  }
      -
      -  func refreshView() {
      -    guard let product: SKProduct = InAppPurchase.getProductBy(identifier: "my_product") else {
      -      self.productTitleLabel.text = "Product unavailable"
      -      return
      -    }
      -    // Display product information.
      -    productTitleLabel.text = product.localizedTitle
      -    productDescriptionLabel.text = product.localizedDescription
      -    purchaseButton.setTitle(product.localizedPrice, for: .normal)
      -
      -    // Disable the button if the product has already been purchased.
      -    if InAppPurchase.hasActivePurchase(for: "my_product") {
      -      statusLabel.text = "OWNED"
      -      purchaseButton.isPointerInteractionEnabled = false
      -    }
      -  }
      -
      -  @IBAction func purchase(_ sender: Any) {
      -    self.loaderView.show()
      -    InAppPurchase.purchase(
      -      productIdentifier: "my_product",
      -      callback: { result in
      -        self.loaderView.hide()
      -      })
      -  }
      -
      -  @IBAction func restorePurchases(_ sender: Any) {
      -    self.loaderView.show()
      -    InAppPurchase.restorePurchases(callback: { result in
      -      self.loaderView.hide()
      -    })
      -  }
      +
    • +
    • Display product information

      +
      guard let product: SKProduct = InAppPurchase.getProductBy(identifier: "my_product") else { return }
      +productTitleLabel.text = product.localizedTitle
      +productDescriptionLabel.text = product.localizedDescription
      +productPriceLabel.text = product.localizedPrice
      +
    • +
    • Initialize a purchase

      +
      @IBAction func purchase(_ sender: Any) {
      +self.loaderView.show()
      +InAppPurchase.purchase(
      +productIdentifier: "my_product",
      +callback: { result in
      +  self.loaderView.hide()
      +})
       }
      -
      +
    +
  • Unlock purchased content

    +
    if InAppPurchase.hasActivePurchase(for: "my_product") {
    +// display content related to the product
    +}
    +
  • +
  • Restore purchases

    +
    @IBAction func restorePurchases(_ sender: Any) {
    +self.loaderView.show()
    +InAppPurchase.restorePurchases(callback: { result in
    +self.loaderView.hide()
    +})
    +}
    +
  • +

    Documentation

      diff --git a/docs/initialization.html b/docs/initialization.html index a87c6e0..a9bfef1 100644 --- a/docs/initialization.html +++ b/docs/initialization.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

      diff --git a/docs/installation.html b/docs/installation.html index 690922b..6ac8784 100644 --- a/docs/installation.html +++ b/docs/installation.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

      @@ -163,22 +163,32 @@

      Installation

      -

      - -

      -
      • Select your project in Xcode
      • Go to the section Swift Package
      • Click on (+) Add Package Dependency
      • +
      + +

      + +

      + + + +

      + +

      + +
      • Make sure your project is selected in Add to target
      • Click on Finish
      -

      Note: You have to import InAppPurchaseLib wherever you use the library.

      -
    diff --git a/docs/micro-example.html b/docs/micro-example.html index 3ae38ac..2b8d48b 100644 --- a/docs/micro-example.html +++ b/docs/micro-example.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -180,7 +180,7 @@

    Micro Example

    } func applicationWillTerminate(_ application: UIApplication) { - // Clean + // Stop library when the application will terminate InAppPurchase.stop() } } @@ -229,6 +229,7 @@

    Micro Example

    } } + // Initiating a purchase @IBAction func purchase(_ sender: Any) { self.loaderView.show() InAppPurchase.purchase( @@ -238,6 +239,7 @@

    Micro Example

    }) } + // Restoring purchases @IBAction func restorePurchases(_ sender: Any) { self.loaderView.show() InAppPurchase.restorePurchases(callback: { result in diff --git a/docs/purchasing.html b/docs/purchasing.html index 7a6996c..3e7ceb4 100644 --- a/docs/purchasing.html +++ b/docs/purchasing.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    @@ -180,7 +180,7 @@

    Purchasing

  • finalizing transactions when product delivery is complete
  • sending purchase request, for which successful doesn’t always mean complete
  • -

    Initiating a purchase

    +

    Initiating a purchase

    To initiate a purchase, use the InAppPurchase.purchase() function. It takes the productIdentifier and a callback function, called when the purchase has been processed.

    diff --git a/docs/refreshing.html b/docs/refreshing.html index 56e094a..0897f2b 100644 --- a/docs/refreshing.html +++ b/docs/refreshing.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/restoring-purchases.html b/docs/restoring-purchases.html index ab44024..b0f5d86 100644 --- a/docs/restoring-purchases.html +++ b/docs/restoring-purchases.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/search.json b/docs/search.json index ca5875b..cb2b57b 100644 --- a/docs/search.json +++ b/docs/search.json @@ -1 +1 @@ -{"Protocols/IAPErrorProtocol.html#/s:16InAppPurchaseLib16IAPErrorProtocolP4codeAA0E4CodeOvp":{"name":"code","abstract":"

    Undocumented

    ","parent_name":"IAPErrorProtocol"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO21libraryNotInitializedyA2CmF":{"name":"libraryNotInitialized","abstract":"

    You must call the initialize fuction before using the library.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO23bundleIdentifierInvalidyA2CmF":{"name":"bundleIdentifierInvalid","abstract":"

    The Bundle Identifier is invalid.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO19validatorUrlInvalidyA2CmF":{"name":"validatorUrlInvalid","abstract":"

    The Validator URL String is invalid.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO20refreshReceiptFailedyA2CmF":{"name":"refreshReceiptFailed","abstract":"

    Failed to refresh the App Store receipt.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO21validateReceiptFailedyA2CmF":{"name":"validateReceiptFailed","abstract":"

    Failed to validate the App Store receipt with Fovea.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO17readReceiptFailedyA2CmF":{"name":"readReceiptFailed","abstract":"

    Failed to read the receipt validation.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO21refreshProductsFailedyA2CmF":{"name":"refreshProductsFailed","abstract":"

    Failed to refresh products from the App Store.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO15productNotFoundyA2CmF":{"name":"productNotFound","abstract":"

    The product was not found on the App Store and cannot be purchased.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO010cannotMakeC0yA2CmF":{"name":"cannotMakePurchase","abstract":"

    The user is not allowed to authorize payments.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO17alreadyPurchasingyA2CmF":{"name":"alreadyPurchasing","abstract":"

    A purchase is already in progress.

    ","parent_name":"IAPErrorCode"},"Structs/IAPError.html#/s:16InAppPurchaseLib8IAPErrorV4codeAA0E4CodeOvp":{"name":"code","abstract":"

    The error code.

    ","parent_name":"IAPError"},"Structs/IAPError.html#/s:16InAppPurchaseLib8IAPErrorV20localizedDescriptionSSvp":{"name":"localizedDescription","abstract":"

    The error description.

    ","parent_name":"IAPError"},"Enums/IAPRefreshResultState.html#/s:16InAppPurchaseLib21IAPRefreshResultStateO9succeededyA2CmF":{"name":"succeeded","abstract":"

    Refresh was successful.

    ","parent_name":"IAPRefreshResultState"},"Enums/IAPRefreshResultState.html#/s:16InAppPurchaseLib21IAPRefreshResultStateO6failedyA2CmF":{"name":"failed","abstract":"

    Refresh failed.

    ","parent_name":"IAPRefreshResultState"},"Enums/IAPRefreshResultState.html#/s:16InAppPurchaseLib21IAPRefreshResultStateO7skippedyA2CmF":{"name":"skipped","abstract":"

    Refresh has been skipped because it is not necessary.

    ","parent_name":"IAPRefreshResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO9purchasedyA2CmF":{"name":"purchased","abstract":"

    The purchase was successful.

    ","parent_name":"IAPPurchaseResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO6failedyA2CmF":{"name":"failed","abstract":"

    Puchase failed.

    ","parent_name":"IAPPurchaseResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO9cancelledyA2CmF":{"name":"cancelled","abstract":"

    The purchase was cancelled by the user.

    ","parent_name":"IAPPurchaseResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO8deferredyA2CmF":{"name":"deferred","abstract":"

    The purchase is deferred.

    ","parent_name":"IAPPurchaseResultState"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV5stateAA0eF5StateOvp":{"name":"state","abstract":"

    Undocumented

    ","parent_name":"IAPRefreshResult"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV8iapErrorAA8IAPErrorVSgvp":{"name":"iapError","abstract":"

    Undocumented

    ","parent_name":"IAPRefreshResult"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV14addedPurchasesSivp":{"name":"addedPurchases","abstract":"

    Undocumented

    ","parent_name":"IAPRefreshResult"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV16updatedPurchasesSivp":{"name":"updatedPurchases","abstract":"

    Undocumented

    ","parent_name":"IAPRefreshResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV5stateAA0eF5StateOvp":{"name":"state","abstract":"

    Undocumented

    ","parent_name":"IAPPurchaseResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV8iapErrorAA8IAPErrorVSgvp":{"name":"iapError","abstract":"

    Undocumented

    ","parent_name":"IAPPurchaseResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV7skErrorSC11SKErrorCodeLeVSgvp":{"name":"skError","abstract":"

    Undocumented

    ","parent_name":"IAPPurchaseResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV20localizedDescriptionSSSgvp":{"name":"localizedDescription","abstract":"

    Undocumented

    ","parent_name":"IAPPurchaseResult"},"Enums/IAPPeriodFormat.html#/s:16InAppPurchaseLib15IAPPeriodFormatO5shortyA2CmF":{"name":"short","abstract":"

    Undocumented

    ","parent_name":"IAPPeriodFormat"},"Enums/IAPPeriodFormat.html#/s:16InAppPurchaseLib15IAPPeriodFormatO4longyA2CmF":{"name":"long","abstract":"

    Undocumented

    ","parent_name":"IAPPeriodFormat"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE21localizedPeriodFormatAC09IAPPeriodH0OvpZ":{"name":"localizedPeriodFormat","abstract":"

    Undocumented

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE28hasIntroductoryPriceEligibleSbyF":{"name":"hasIntroductoryPriceEligible()","abstract":"

    Checks if the product has an introductory price the user is eligible to.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE14localizedPriceSSvp":{"name":"localizedPrice","abstract":"

    Returns a localized string with the cost of the product in the local currency.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE27localizedSubscriptionPeriodSSSgvp":{"name":"localizedSubscriptionPeriod","abstract":"

    Returns a localized string with the period of the subscription product.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE26localizedIntroductoryPriceSSSgvp":{"name":"localizedIntroductoryPrice","abstract":"

    Returns a localized string with the introductory price if available, in the local currency.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE27localizedIntroductoryPeriodSSSgvp":{"name":"localizedIntroductoryPeriod","abstract":"

    Returns a localized string with the introductory price period of the subscription product.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE29localizedIntroductoryDurationSSSgvp":{"name":"localizedIntroductoryDuration","abstract":"

    Returns a localized string with the duration of the introductory price.

    ","parent_name":"SKProduct"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO10consumableyA2CmF":{"name":"consumable","abstract":"

    Undocumented

    ","parent_name":"IAPProductType"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO13nonConsumableyA2CmF":{"name":"nonConsumable","abstract":"

    Undocumented

    ","parent_name":"IAPProductType"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO23nonRenewingSubscriptionyA2CmF":{"name":"nonRenewingSubscription","abstract":"

    Undocumented

    ","parent_name":"IAPProductType"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO25autoRenewableSubscriptionyA2CmF":{"name":"autoRenewableSubscription","abstract":"

    Undocumented

    ","parent_name":"IAPProductType"},"Structs/IAPProduct.html#/s:16InAppPurchaseLib10IAPProductV17productIdentifierSSvp":{"name":"productIdentifier","abstract":"

    The identifier of the product.

    ","parent_name":"IAPProduct"},"Structs/IAPProduct.html#/s:16InAppPurchaseLib10IAPProductV11productTypeAA0eG0Ovp":{"name":"productType","abstract":"

    The type of the product.

    ","parent_name":"IAPProduct"},"Structs/IAPProduct.html#/s:16InAppPurchaseLib10IAPProductV17productIdentifier0F4TypeACSS_AA0eH0Otcfc":{"name":"init(productIdentifier:productType:)","abstract":"

    Initializes an IAPProduct with its identifier and type.

    ","parent_name":"IAPProduct"},"Protocols/IAPPurchaseDelegate.html#/s:16InAppPurchaseLib19IAPPurchaseDelegateP16productPurchased0G10IdentifierySS_tF":{"name":"productPurchased(productIdentifier:)","abstract":"

    Called when a product is newly purchased, updated or restored.

    ","parent_name":"IAPPurchaseDelegate"},"Classes/DefaultPurchaseDelegate.html#/s:16InAppPurchaseLib07DefaultC8DelegateCACycfc":{"name":"init()","abstract":"

    Undocumented

    ","parent_name":"DefaultPurchaseDelegate"},"Classes/DefaultPurchaseDelegate.html#/s:16InAppPurchaseLib07DefaultC8DelegateC16productPurchased0G10IdentifierySS_tF":{"name":"productPurchased(productIdentifier:)","abstract":"

    Finish the product transactions when a product is newly purchased, updated or restored.

    ","parent_name":"DefaultPurchaseDelegate"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP11iapProductsSayAA10IAPProductVGvpZ":{"name":"iapProducts","abstract":"

    The array of IAPProduct.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP18validatorUrlStringSSSgvpZ":{"name":"validatorUrlString","abstract":"

    The validator url retrieved from Fovea.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP03iapC8DelegateAA011IAPPurchaseF0_pSgvpZ":{"name":"iapPurchaseDelegate","abstract":"

    The instance of class that adopts the IAPPurchaseDelegate protocol.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP19applicationUsernameSSSgvpZ":{"name":"applicationUsername","abstract":"

    The user name, if your app implements user login.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP10initialize11iapProducts18validatorUrlString0fC8Delegate19applicationUsernameySayAA10IAPProductVG_SSAA011IAPPurchaseK0_pSSSgtFZ":{"name":"initialize(iapProducts:validatorUrlString:iapPurchaseDelegate:applicationUsername:)","abstract":"

    Start observing the payment queue, as soon as possible, and refresh Product list and user Receipt.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP4stopyyFZ":{"name":"stop()","abstract":"

    Stop observing the payment queue, when the application will terminate, for proper cleanup.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP7refresh8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"refresh(callback:)","abstract":"

    Refresh Product list and user Receipt.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP11getProductsSaySo9SKProductCGyFZ":{"name":"getProducts()","abstract":"

    Gets all products retrieved from the App Store

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP12getProductBy10identifierSo9SKProductCSgSS_tFZ":{"name":"getProductBy(identifier:)","abstract":"

    Gets the product by its identifier from the list of products retrieved from the App Store.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP15canMakePaymentsSbyFZ":{"name":"canMakePayments()","abstract":"

    Checks if the user is allowed to authorize payments.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP8purchase17productIdentifier8quantity8callbackySS_SiyAA17IAPPurchaseResultVctFZ":{"name":"purchase(productIdentifier:quantity:callback:)","abstract":"

    Request a Payment from the App Store.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP16restorePurchases8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"restorePurchases(callback:)","abstract":"

    Restore purchased products.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP18finishTransactions3forySS_tFZ":{"name":"finishTransactions(for:)","abstract":"

    Finish all transactions for the product.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP22hasDeferredTransaction3forSbSS_tFZ":{"name":"hasDeferredTransaction(for:)","abstract":"

    Checks if the last transaction state for a given product was deferred.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP19hasAlreadyPurchasedSbyFZ":{"name":"hasAlreadyPurchased()","abstract":"

    Checks if the user has already purchased at least one product.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP09hasActiveC03forSbSS_tFZ":{"name":"hasActivePurchase(for:)","abstract":"

    Checks if the user currently own (or is subscribed to) a given product (nonConsumable or autoRenewableSubscription).

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP21hasActiveSubscriptionSbyFZ":{"name":"hasActiveSubscription()","abstract":"

    Checks if the user has an active auto renewable subscription regardless of the product identifier.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP03getC4Date3for10Foundation0F0VSgSS_tFZ":{"name":"getPurchaseDate(for:)","abstract":"

    Returns the latest purchased date for a given product.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP13getExpiryDate3for10Foundation0G0VSgSS_tFZ":{"name":"getExpiryDate(for:)","abstract":"

    Returns the expiry date for a subcription. May be past or future.

    ","parent_name":"InAppPurchaseLib"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C11iapProductsSayAA10IAPProductVGvpZ":{"name":"iapProducts","abstract":"

    The array of IAPProduct.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C18validatorUrlStringSSSgvpZ":{"name":"validatorUrlString","abstract":"

    The validator url retrieved from Fovea.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C03iapC8DelegateAA011IAPPurchaseF0_pSgvpZ":{"name":"iapPurchaseDelegate","abstract":"

    The instance of class that adopts the IAPPurchaseDelegate protocol.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C19applicationUsernameSSSgvpZ":{"name":"applicationUsername","abstract":"

    The user name, if your app implements user login.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C10initialize11iapProducts18validatorUrlString0fC8Delegate19applicationUsernameySayAA10IAPProductVG_SSAA011IAPPurchaseK0_pSSSgtFZ":{"name":"initialize(iapProducts:validatorUrlString:iapPurchaseDelegate:applicationUsername:)","abstract":"

    Start observing the payment queue, as soon as possible, and refresh Product list and user Receipt.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C4stopyyFZ":{"name":"stop()","abstract":"

    Stop observing the payment queue, when the application will terminate, for proper cleanup.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C7refresh8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"refresh(callback:)","abstract":"

    Refresh Product list and user Receipt.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C11getProductsSaySo9SKProductCGyFZ":{"name":"getProducts()","abstract":"

    Gets all products retrieved from the App Store

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C12getProductBy10identifierSo9SKProductCSgSS_tFZ":{"name":"getProductBy(identifier:)","abstract":"

    Gets the product by its identifier from the list of products retrieved from the App Store.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C15canMakePaymentsSbyFZ":{"name":"canMakePayments()","abstract":"

    Checks if the user is allowed to authorize payments.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C8purchase17productIdentifier8quantity8callbackySS_SiyAA17IAPPurchaseResultVctFZ":{"name":"purchase(productIdentifier:quantity:callback:)","abstract":"

    Request a Payment from the App Store.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C16restorePurchases8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"restorePurchases(callback:)","abstract":"

    Restore purchased products.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C18finishTransactions3forySS_tFZ":{"name":"finishTransactions(for:)","abstract":"

    Finish all transactions for the product.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C22hasDeferredTransaction3forSbSS_tFZ":{"name":"hasDeferredTransaction(for:)","abstract":"

    Checks if the last transaction state for a given product was deferred.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C19hasAlreadyPurchasedSbyFZ":{"name":"hasAlreadyPurchased()","abstract":"

    Checks if the user has already purchased at least one product.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C09hasActiveC03forSbSS_tFZ":{"name":"hasActivePurchase(for:)","abstract":"

    Checks if the user currently own (or is subscribed to) a given product (nonConsumable or autoRenewableSubscription).

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C21hasActiveSubscriptionSbyFZ":{"name":"hasActiveSubscription()","abstract":"

    Checks if the user has an active auto renewable subscription regardless of the product identifier.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C03getC4Date3for10Foundation0F0VSgSS_tFZ":{"name":"getPurchaseDate(for:)","abstract":"

    Returns the latest purchased date for a given product.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C13getExpiryDate3for10Foundation0G0VSgSS_tFZ":{"name":"getExpiryDate(for:)","abstract":"

    Returns the expiry date for a subcription. May be past or future.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html":{"name":"InAppPurchase"},"Protocols/InAppPurchaseLib.html":{"name":"InAppPurchaseLib","abstract":"

    The protocol that InAppPurchase adopts.

    "},"Classes/DefaultPurchaseDelegate.html":{"name":"DefaultPurchaseDelegate","abstract":"

    The default implementation of IAPPurchaseDelegate if no other is provided. It is enough if you only have non-consumable and/or auto-renewable subscription products.

    "},"Protocols/IAPPurchaseDelegate.html":{"name":"IAPPurchaseDelegate","abstract":"

    The protocol that you must adopt if you have consumable and/or non-renewing subscription products.

    "},"Structs/IAPProduct.html":{"name":"IAPProduct","abstract":"

    Undocumented

    "},"Enums/IAPProductType.html":{"name":"IAPProductType","abstract":"

    Undocumented

    "},"Extensions/SKProduct.html":{"name":"SKProduct"},"Enums/IAPPeriodFormat.html":{"name":"IAPPeriodFormat","abstract":"

    Undocumented

    "},"API%20documentation.html#/s:16InAppPurchaseLib19IAPPurchaseCallbacka":{"name":"IAPPurchaseCallback","abstract":"

    Undocumented

    "},"API%20documentation.html#/s:16InAppPurchaseLib18IAPRefreshCallbacka":{"name":"IAPRefreshCallback","abstract":"

    Undocumented

    "},"Structs/IAPPurchaseResult.html":{"name":"IAPPurchaseResult","abstract":"

    The result returned in the purchase() callback.

    "},"Structs/IAPRefreshResult.html":{"name":"IAPRefreshResult","abstract":"

    The result returned in the refresh() or restorePurchases() callback.

    "},"Enums/IAPPurchaseResultState.html":{"name":"IAPPurchaseResultState","abstract":"

    The list of the different states of the IAPPurchaseResult.

    "},"Enums/IAPRefreshResultState.html":{"name":"IAPRefreshResultState","abstract":"

    The list of the different states of the IAPRefreshResult.

    "},"Structs/IAPError.html":{"name":"IAPError","abstract":"

    When calling refresh(), purchase() or restorePurchases(), the callback can return an IAPError if the state is failed.

    "},"Enums/IAPErrorCode.html":{"name":"IAPErrorCode","abstract":"

    The list of error codes that can be returned by the library.

    "},"Protocols/IAPErrorProtocol.html":{"name":"IAPErrorProtocol","abstract":"

    Undocumented

    "},"initialization.html":{"name":"Initialization"},"displaying-products.html":{"name":"Displaying products"},"displaying-subscriptions.html":{"name":"Displaying subscriptions"},"refreshing.html":{"name":"Refreshing"},"purchasing.html":{"name":"Purchasing"},"handling-purchases.html":{"name":"Handling purchases"},"restoring-purchases.html":{"name":"Restoring purchases"},"displaying-products-with-purchases.html":{"name":"Displaying products with purchases"},"errors.html":{"name":"Errors"},"analytics.html":{"name":"Analytics"},"server-integration.html":{"name":"Server integration"},"installation.html":{"name":"Installation"},"micro-example.html":{"name":"Micro Example"},"Getting%20Started.html":{"name":"Getting Started"},"Usage.html":{"name":"Usage"},"API%20documentation.html":{"name":"API documentation"}} \ No newline at end of file +{"Protocols/IAPErrorProtocol.html#/s:16InAppPurchaseLib16IAPErrorProtocolP4codeAA0E4CodeOvp":{"name":"code","abstract":"

    Undocumented

    ","parent_name":"IAPErrorProtocol"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO21libraryNotInitializedyA2CmF":{"name":"libraryNotInitialized","abstract":"

    You must call the initialize fuction before using the library.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO23bundleIdentifierInvalidyA2CmF":{"name":"bundleIdentifierInvalid","abstract":"

    The Bundle Identifier is invalid.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO19validatorUrlInvalidyA2CmF":{"name":"validatorUrlInvalid","abstract":"

    The Validator URL String is invalid.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO20refreshReceiptFailedyA2CmF":{"name":"refreshReceiptFailed","abstract":"

    Failed to refresh the App Store receipt.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO21validateReceiptFailedyA2CmF":{"name":"validateReceiptFailed","abstract":"

    Failed to validate the App Store receipt with Fovea.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO17readReceiptFailedyA2CmF":{"name":"readReceiptFailed","abstract":"

    Failed to read the receipt validation.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO21refreshProductsFailedyA2CmF":{"name":"refreshProductsFailed","abstract":"

    Failed to refresh products from the App Store.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO15productNotFoundyA2CmF":{"name":"productNotFound","abstract":"

    The product was not found on the App Store and cannot be purchased.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO010cannotMakeC0yA2CmF":{"name":"cannotMakePurchase","abstract":"

    The user is not allowed to authorize payments.

    ","parent_name":"IAPErrorCode"},"Enums/IAPErrorCode.html#/s:16InAppPurchaseLib12IAPErrorCodeO17alreadyPurchasingyA2CmF":{"name":"alreadyPurchasing","abstract":"

    A purchase is already in progress.

    ","parent_name":"IAPErrorCode"},"Structs/IAPError.html#/s:16InAppPurchaseLib8IAPErrorV4codeAA0E4CodeOvp":{"name":"code","abstract":"

    The error code.

    ","parent_name":"IAPError"},"Structs/IAPError.html#/s:16InAppPurchaseLib8IAPErrorV20localizedDescriptionSSvp":{"name":"localizedDescription","abstract":"

    The error description.

    ","parent_name":"IAPError"},"Enums/IAPRefreshResultState.html#/s:16InAppPurchaseLib21IAPRefreshResultStateO9succeededyA2CmF":{"name":"succeeded","abstract":"

    Refresh was successful.

    ","parent_name":"IAPRefreshResultState"},"Enums/IAPRefreshResultState.html#/s:16InAppPurchaseLib21IAPRefreshResultStateO6failedyA2CmF":{"name":"failed","abstract":"

    Refresh failed.

    ","parent_name":"IAPRefreshResultState"},"Enums/IAPRefreshResultState.html#/s:16InAppPurchaseLib21IAPRefreshResultStateO7skippedyA2CmF":{"name":"skipped","abstract":"

    Refresh has been skipped because it is not necessary.

    ","parent_name":"IAPRefreshResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO9purchasedyA2CmF":{"name":"purchased","abstract":"

    The purchase was successful.

    ","parent_name":"IAPPurchaseResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO6failedyA2CmF":{"name":"failed","abstract":"

    Puchase failed.

    ","parent_name":"IAPPurchaseResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO9cancelledyA2CmF":{"name":"cancelled","abstract":"

    The purchase was cancelled by the user.

    ","parent_name":"IAPPurchaseResultState"},"Enums/IAPPurchaseResultState.html#/s:16InAppPurchaseLib22IAPPurchaseResultStateO8deferredyA2CmF":{"name":"deferred","abstract":"

    The purchase is deferred.

    ","parent_name":"IAPPurchaseResultState"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV5stateAA0eF5StateOvp":{"name":"state","abstract":"

    The result state.

    ","parent_name":"IAPRefreshResult"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV8iapErrorAA8IAPErrorVSgvp":{"name":"iapError","abstract":"

    If the state is failed, the result can return an IAPError.","parent_name":"IAPRefreshResult"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV14addedPurchasesSivp":{"name":"addedPurchases","abstract":"

    If the state is succeeded, returns the number of purchases that have been added.

    ","parent_name":"IAPRefreshResult"},"Structs/IAPRefreshResult.html#/s:16InAppPurchaseLib16IAPRefreshResultV16updatedPurchasesSivp":{"name":"updatedPurchases","abstract":"

    If the state is succeeded, returns the number of purchases that have been updated.

    ","parent_name":"IAPRefreshResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV5stateAA0eF5StateOvp":{"name":"state","abstract":"

    The result state.

    ","parent_name":"IAPPurchaseResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV8iapErrorAA8IAPErrorVSgvp":{"name":"iapError","abstract":"

    If the state is failed, the result can return an IAPError.","parent_name":"IAPPurchaseResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV7skErrorSC11SKErrorCodeLeVSgvp":{"name":"skError","abstract":"

    If the state is failed, the result can return an SKError.","parent_name":"IAPPurchaseResult"},"Structs/IAPPurchaseResult.html#/s:16InAppPurchaseLib17IAPPurchaseResultV20localizedDescriptionSSSgvp":{"name":"localizedDescription","abstract":"

    If there is an error, return the localized description.

    ","parent_name":"IAPPurchaseResult"},"Enums/IAPPeriodFormat.html#/s:16InAppPurchaseLib15IAPPeriodFormatO5shortyA2CmF":{"name":"short","abstract":"

    Remove the number of units if it is equal to 1.","parent_name":"IAPPeriodFormat"},"Enums/IAPPeriodFormat.html#/s:16InAppPurchaseLib15IAPPeriodFormatO4longyA2CmF":{"name":"long","abstract":"

    The period will be returned with the number and the unit.","parent_name":"IAPPeriodFormat"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE21localizedPeriodFormatAC09IAPPeriodH0OvpZ":{"name":"localizedPeriodFormat","abstract":"

    The format used for the localized subscription periods.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE28hasIntroductoryPriceEligibleSbyF":{"name":"hasIntroductoryPriceEligible()","abstract":"

    Checks if the product has an introductory price the user is eligible to.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE14localizedPriceSSvp":{"name":"localizedPrice","abstract":"

    Returns a localized string with the cost of the product in the local currency.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE27localizedSubscriptionPeriodSSSgvp":{"name":"localizedSubscriptionPeriod","abstract":"

    Returns a localized string with the period of the subscription product.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE26localizedIntroductoryPriceSSSgvp":{"name":"localizedIntroductoryPrice","abstract":"

    Returns a localized string with the introductory price if available, in the local currency.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE27localizedIntroductoryPeriodSSSgvp":{"name":"localizedIntroductoryPeriod","abstract":"

    Returns a localized string with the introductory price period of the subscription product.

    ","parent_name":"SKProduct"},"Extensions/SKProduct.html#/s:So9SKProductC16InAppPurchaseLibE29localizedIntroductoryDurationSSSgvp":{"name":"localizedIntroductoryDuration","abstract":"

    Returns a localized string with the duration of the introductory price.

    ","parent_name":"SKProduct"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO10consumableyA2CmF":{"name":"consumable","abstract":"

    Consumable in-app purchases are used once, are depleted, and can be purchased again.

    ","parent_name":"IAPProductType"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO13nonConsumableyA2CmF":{"name":"nonConsumable","abstract":"

    Non-consumables are purchased once and do not expire.

    ","parent_name":"IAPProductType"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO23nonRenewingSubscriptionyA2CmF":{"name":"nonRenewingSubscription","abstract":"

    This type of subscription does not renew automatically, so users need to renew each time.

    ","parent_name":"IAPProductType"},"Enums/IAPProductType.html#/s:16InAppPurchaseLib14IAPProductTypeO25autoRenewableSubscriptionyA2CmF":{"name":"autoRenewableSubscription","abstract":"

    Users are charged on a recurring basis until they decide to cancel.

    ","parent_name":"IAPProductType"},"Structs/IAPProduct.html#/s:16InAppPurchaseLib10IAPProductV17productIdentifierSSvp":{"name":"productIdentifier","abstract":"

    The identifier of the product.

    ","parent_name":"IAPProduct"},"Structs/IAPProduct.html#/s:16InAppPurchaseLib10IAPProductV11productTypeAA0eG0Ovp":{"name":"productType","abstract":"

    The type of the product.

    ","parent_name":"IAPProduct"},"Structs/IAPProduct.html#/s:16InAppPurchaseLib10IAPProductV17productIdentifier0F4TypeACSS_AA0eH0Otcfc":{"name":"init(productIdentifier:productType:)","abstract":"

    Initializes an IAPProduct with its identifier and type.

    ","parent_name":"IAPProduct"},"Protocols/IAPPurchaseDelegate.html#/s:16InAppPurchaseLib19IAPPurchaseDelegateP16productPurchased0G10IdentifierySS_tF":{"name":"productPurchased(productIdentifier:)","abstract":"

    Called when a product is newly purchased, updated or restored.

    ","parent_name":"IAPPurchaseDelegate"},"Classes/DefaultPurchaseDelegate.html#/s:16InAppPurchaseLib07DefaultC8DelegateCACycfc":{"name":"init()","abstract":"

    Undocumented

    ","parent_name":"DefaultPurchaseDelegate"},"Classes/DefaultPurchaseDelegate.html#/s:16InAppPurchaseLib07DefaultC8DelegateC16productPurchased0G10IdentifierySS_tF":{"name":"productPurchased(productIdentifier:)","abstract":"

    Finish the product transactions when a product is newly purchased, updated or restored.

    ","parent_name":"DefaultPurchaseDelegate"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP11iapProductsSayAA10IAPProductVGvpZ":{"name":"iapProducts","abstract":"

    The array of IAPProduct.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP18validatorUrlStringSSSgvpZ":{"name":"validatorUrlString","abstract":"

    The validator url retrieved from Fovea.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP03iapC8DelegateAA011IAPPurchaseF0_pSgvpZ":{"name":"iapPurchaseDelegate","abstract":"

    The instance of class that adopts the IAPPurchaseDelegate protocol.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP19applicationUsernameSSSgvpZ":{"name":"applicationUsername","abstract":"

    The user name, if your app implements user login.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP10initialize11iapProducts18validatorUrlString0fC8Delegate19applicationUsernameySayAA10IAPProductVG_SSAA011IAPPurchaseK0_pSSSgtFZ":{"name":"initialize(iapProducts:validatorUrlString:iapPurchaseDelegate:applicationUsername:)","abstract":"

    Start observing the payment queue, as soon as possible, and refresh Product list and user Receipt.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP4stopyyFZ":{"name":"stop()","abstract":"

    Stop observing the payment queue, when the application will terminate, for proper cleanup.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP7refresh8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"refresh(callback:)","abstract":"

    Refresh Product list and user Receipt.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP11getProductsSaySo9SKProductCGyFZ":{"name":"getProducts()","abstract":"

    Gets all products retrieved from the App Store

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP12getProductBy10identifierSo9SKProductCSgSS_tFZ":{"name":"getProductBy(identifier:)","abstract":"

    Gets the product by its identifier from the list of products retrieved from the App Store.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP15canMakePaymentsSbyFZ":{"name":"canMakePayments()","abstract":"

    Checks if the user is allowed to authorize payments.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP8purchase17productIdentifier8quantity8callbackySS_SiyAA17IAPPurchaseResultVctFZ":{"name":"purchase(productIdentifier:quantity:callback:)","abstract":"

    Request a Payment from the App Store.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP16restorePurchases8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"restorePurchases(callback:)","abstract":"

    Restore purchased products.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP18finishTransactions3forySS_tFZ":{"name":"finishTransactions(for:)","abstract":"

    Finish all transactions for the product.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP22hasDeferredTransaction3forSbSS_tFZ":{"name":"hasDeferredTransaction(for:)","abstract":"

    Checks if the last transaction state for a given product was deferred.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP19hasAlreadyPurchasedSbyFZ":{"name":"hasAlreadyPurchased()","abstract":"

    Checks if the user has already purchased at least one product.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP09hasActiveC03forSbSS_tFZ":{"name":"hasActivePurchase(for:)","abstract":"

    Checks if the user currently own (or is subscribed to) a given product (nonConsumable or autoRenewableSubscription).

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP21hasActiveSubscriptionSbyFZ":{"name":"hasActiveSubscription()","abstract":"

    Checks if the user has an active auto renewable subscription regardless of the product identifier.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP03getC4Date3for10Foundation0F0VSgSS_tFZ":{"name":"getPurchaseDate(for:)","abstract":"

    Returns the latest purchased date for a given product.

    ","parent_name":"InAppPurchaseLib"},"Protocols/InAppPurchaseLib.html#/s:16InAppPurchaseLibAAP13getExpiryDate3for10Foundation0G0VSgSS_tFZ":{"name":"getExpiryDate(for:)","abstract":"

    Returns the expiry date for a subcription. May be past or future.

    ","parent_name":"InAppPurchaseLib"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C11iapProductsSayAA10IAPProductVGvpZ":{"name":"iapProducts","abstract":"

    The array of IAPProduct.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C18validatorUrlStringSSSgvpZ":{"name":"validatorUrlString","abstract":"

    The validator url retrieved from Fovea.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C03iapC8DelegateAA011IAPPurchaseF0_pSgvpZ":{"name":"iapPurchaseDelegate","abstract":"

    The instance of class that adopts the IAPPurchaseDelegate protocol.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C19applicationUsernameSSSgvpZ":{"name":"applicationUsername","abstract":"

    The user name, if your app implements user login.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C10initialize11iapProducts18validatorUrlString0fC8Delegate19applicationUsernameySayAA10IAPProductVG_SSAA011IAPPurchaseK0_pSSSgtFZ":{"name":"initialize(iapProducts:validatorUrlString:iapPurchaseDelegate:applicationUsername:)","abstract":"

    Start observing the payment queue, as soon as possible, and refresh Product list and user Receipt.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C4stopyyFZ":{"name":"stop()","abstract":"

    Stop observing the payment queue, when the application will terminate, for proper cleanup.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C7refresh8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"refresh(callback:)","abstract":"

    Refresh Product list and user Receipt.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C11getProductsSaySo9SKProductCGyFZ":{"name":"getProducts()","abstract":"

    Gets all products retrieved from the App Store

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C12getProductBy10identifierSo9SKProductCSgSS_tFZ":{"name":"getProductBy(identifier:)","abstract":"

    Gets the product by its identifier from the list of products retrieved from the App Store.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C15canMakePaymentsSbyFZ":{"name":"canMakePayments()","abstract":"

    Checks if the user is allowed to authorize payments.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C8purchase17productIdentifier8quantity8callbackySS_SiyAA17IAPPurchaseResultVctFZ":{"name":"purchase(productIdentifier:quantity:callback:)","abstract":"

    Request a Payment from the App Store.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C16restorePurchases8callbackyyAA16IAPRefreshResultVc_tFZ":{"name":"restorePurchases(callback:)","abstract":"

    Restore purchased products.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C18finishTransactions3forySS_tFZ":{"name":"finishTransactions(for:)","abstract":"

    Finish all transactions for the product.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C22hasDeferredTransaction3forSbSS_tFZ":{"name":"hasDeferredTransaction(for:)","abstract":"

    Checks if the last transaction state for a given product was deferred.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C19hasAlreadyPurchasedSbyFZ":{"name":"hasAlreadyPurchased()","abstract":"

    Checks if the user has already purchased at least one product.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C09hasActiveC03forSbSS_tFZ":{"name":"hasActivePurchase(for:)","abstract":"

    Checks if the user currently own (or is subscribed to) a given product (nonConsumable or autoRenewableSubscription).

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C21hasActiveSubscriptionSbyFZ":{"name":"hasActiveSubscription()","abstract":"

    Checks if the user has an active auto renewable subscription regardless of the product identifier.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C03getC4Date3for10Foundation0F0VSgSS_tFZ":{"name":"getPurchaseDate(for:)","abstract":"

    Returns the latest purchased date for a given product.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html#/s:16InAppPurchaseLib0abC0C13getExpiryDate3for10Foundation0G0VSgSS_tFZ":{"name":"getExpiryDate(for:)","abstract":"

    Returns the expiry date for a subcription. May be past or future.

    ","parent_name":"InAppPurchase"},"Classes/InAppPurchase.html":{"name":"InAppPurchase","abstract":"

    The main class of the library.

    "},"Protocols/InAppPurchaseLib.html":{"name":"InAppPurchaseLib","abstract":"

    The protocol that InAppPurchase adopts.

    "},"Classes/DefaultPurchaseDelegate.html":{"name":"DefaultPurchaseDelegate","abstract":"

    The default implementation of IAPPurchaseDelegate if no other is provided. It is enough if you only have non-consumable and/or auto-renewable subscription products.

    "},"Protocols/IAPPurchaseDelegate.html":{"name":"IAPPurchaseDelegate","abstract":"

    The protocol that you must adopt if you have consumable and/or non-renewing subscription products.

    "},"Structs/IAPProduct.html":{"name":"IAPProduct","abstract":"

    Basic product information used by InAppPurchase.

    "},"Enums/IAPProductType.html":{"name":"IAPProductType","abstract":"

    Types of in-app purchases.

    "},"Extensions/SKProduct.html":{"name":"SKProduct"},"Enums/IAPPeriodFormat.html":{"name":"IAPPeriodFormat","abstract":"

    The format used for the localized subscription periods.

    "},"API%20documentation.html#/s:16InAppPurchaseLib19IAPPurchaseCallbacka":{"name":"IAPPurchaseCallback","abstract":"

    Undocumented

    "},"API%20documentation.html#/s:16InAppPurchaseLib18IAPRefreshCallbacka":{"name":"IAPRefreshCallback","abstract":"

    Undocumented

    "},"Structs/IAPPurchaseResult.html":{"name":"IAPPurchaseResult","abstract":"

    The result returned in the purchase() callback.

    "},"Structs/IAPRefreshResult.html":{"name":"IAPRefreshResult","abstract":"

    The result returned in the refresh() or restorePurchases() callback.

    "},"Enums/IAPPurchaseResultState.html":{"name":"IAPPurchaseResultState","abstract":"

    The list of the different states of the IAPPurchaseResult.

    "},"Enums/IAPRefreshResultState.html":{"name":"IAPRefreshResultState","abstract":"

    The list of the different states of the IAPRefreshResult.

    "},"Structs/IAPError.html":{"name":"IAPError","abstract":"

    When calling refresh(), purchase() or restorePurchases(), the callback can return an IAPError if the state is failed.

    "},"Enums/IAPErrorCode.html":{"name":"IAPErrorCode","abstract":"

    The list of error codes that can be returned by the library.

    "},"Protocols/IAPErrorProtocol.html":{"name":"IAPErrorProtocol","abstract":"

    Undocumented

    "},"initialization.html":{"name":"Initialization"},"displaying-products.html":{"name":"Displaying products"},"displaying-subscriptions.html":{"name":"Displaying subscriptions"},"refreshing.html":{"name":"Refreshing"},"purchasing.html":{"name":"Purchasing"},"handling-purchases.html":{"name":"Handling purchases"},"restoring-purchases.html":{"name":"Restoring purchases"},"displaying-products-with-purchases.html":{"name":"Displaying products with purchases"},"errors.html":{"name":"Errors"},"analytics.html":{"name":"Analytics"},"server-integration.html":{"name":"Server integration"},"installation.html":{"name":"Installation"},"micro-example.html":{"name":"Micro Example"},"Getting%20Started.html":{"name":"Getting Started"},"Usage.html":{"name":"Usage"},"API%20documentation.html":{"name":"API documentation"}} \ No newline at end of file diff --git a/docs/server-integration.html b/docs/server-integration.html index ab51e7d..3a3900d 100644 --- a/docs/server-integration.html +++ b/docs/server-integration.html @@ -22,7 +22,7 @@ InAppPurchaseLib documentation - (77% documented) + (95% documented)

    diff --git a/docs/undocumented.json b/docs/undocumented.json index f5e8bed..6522d6d 100644 --- a/docs/undocumented.json +++ b/docs/undocumented.json @@ -9,67 +9,11 @@ }, { "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 16, - "symbol": "IAPPurchaseResult.state", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 17, - "symbol": "IAPPurchaseResult.iapError", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 18, - "symbol": "IAPPurchaseResult.skError", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 20, - "symbol": "IAPPurchaseResult.localizedDescription", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 40, + "line": 52, "symbol": "IAPRefreshCallback", "symbol_kind": "source.lang.swift.decl.typealias", "warning": "undocumented" }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 44, - "symbol": "IAPRefreshResult.state", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 45, - "symbol": "IAPRefreshResult.iapError", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 46, - "symbol": "IAPRefreshResult.addedPurchases", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPCallback.swift", - "line": 47, - "symbol": "IAPRefreshResult.updatedPurchases", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, { "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Common/IAPError.swift", "line": 11, @@ -90,76 +34,6 @@ "symbol": "DefaultPurchaseDelegate.init()", "symbol_kind": "source.lang.swift.decl.function.method.instance", "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/IAPProduct.swift", - "line": 10, - "symbol": "IAPProduct", - "symbol_kind": "source.lang.swift.decl.struct", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/IAPProduct.swift", - "line": 30, - "symbol": "IAPProductType", - "symbol_kind": "source.lang.swift.decl.enum", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/IAPProduct.swift", - "line": 31, - "symbol": "IAPProductType.consumable", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/IAPProduct.swift", - "line": 32, - "symbol": "IAPProductType.nonConsumable", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/IAPProduct.swift", - "line": 33, - "symbol": "IAPProductType.nonRenewingSubscription", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/IAPProduct.swift", - "line": 34, - "symbol": "IAPProductType.autoRenewableSubscription", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/SKProductExtension.swift", - "line": 12, - "symbol": "IAPPeriodFormat", - "symbol_kind": "source.lang.swift.decl.enum", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/SKProductExtension.swift", - "line": 13, - "symbol": "IAPPeriodFormat.short", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/SKProductExtension.swift", - "line": 14, - "symbol": "IAPPeriodFormat.long", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/veronique/Documents/iap-swift-lib/Sources/InAppPurchaseLib/Product/SKProductExtension.swift", - "line": 20, - "symbol": "SKProduct.localizedPeriodFormat", - "symbol_kind": "source.lang.swift.decl.var.static", - "warning": "undocumented" } ], "source_directory": "/Users/veronique/Documents/iap-swift-lib" diff --git a/img/ScreenshotInstallation2.png b/img/ScreenshotInstallation2.png new file mode 100644 index 0000000..88a3ee3 Binary files /dev/null and b/img/ScreenshotInstallation2.png differ