Embed a store in your app. Process financial transactions associated with the purchase of content and services.
- iOS 3.0+
- macOS 10.7+
- tvOS 9.0+
The Store Kit framework provides classes that allow an app to request payment from a user for additional functionality or content that your application delivers.
A StoreKit request may fail for one of many possible reasons, including invalid product information, invalid payment details, problems with your iTunes Connect account, or networking issues. When handling errors, such as with the
request(_: delegate method, it is therefore important to use the
code of the resulting error to determine the underlying cause of failure.
SKError error domain is used for errors related to payments, store products, and cloud services, as described in
SKError. For additional information for troubleshooting StoreKit framework issues, see the In-App Purchase FAQ.
NSURLError error domain is used for errors related to networking. The following table describes some of the most common networking errors that may occur when using StoreKit.
The connection timed out.
The connection failed because the host could not be found.
The connection failed because a connection cannot be made to the host.
The connection failed because the network connection was lost.
The connection failed because the device is not connected to the internet.
The connection failed because the user cancelled required authentication.
The secure connection failed for an unknown reason.