![]() ![]() It is important that you add an observer to that payment queue as soon as your application becomes active to ensure it doesn't miss any transactions.Īpple even suggests to add an observer in the application(_:didFinishLaunchingWithOptions:) method of the UIApplicationDelegate protocol. ![]() The default payment queue your application has access to through the default() class method is accessible as soon as your application is launched by the operating system. Don't keep a separate cache of transactions for later use for whatever reason. Observe the payment queue and respond to the transactions your application receives. The transactions you access through the payment queue are the only transactions that your application should care about. What does that mean for you, the developer? Trust the Payment Queue Apple emphasizes that the payment queue your application has access to is the single source of truth with regards to the transactions the user makes in your application. ![]() Your application uses it to communicate with the App Store, process purchases, and observe the state of the transactions associated with those purchases.Ī mistake developers sometimes make is caching transactions or storing transactions for later use. The SKPaymentQueue class is a key member of the StoreKit framework. In this tutorial, I focus on five common mistakes developers make when using the StoreKit framework in a Cocoa project. As with many other frameworks, such as Core Data, you need to understand the ins and outs of the framework to avoid common mistakes. The StoreKit framework has been around for many years and I actually enjoy working with it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |