You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apple recommends to register a transaction observer [as soon as the app starts](https://developer.apple.com/library/ios/technotes/tn2387/_index.html):
29
31
> Adding your app's observer at launch ensures that it will persist during all launches of your app, thus allowing your app to receive all the payment queue notifications.
@@ -33,13 +35,17 @@ SwiftyStoreKit supports this by calling `completeTransactions()` when the app st
When you purchase a product the following things happen:
151
+
152
+
* A payment is added to the payment queue for your IAP.
153
+
* When the payment has been processed with Apple, the payment queue is updated so that the appropriate transaction can be handled.
154
+
* If the transaction state is **purchased** or **restored**, the app can unlock the functionality purchased by the user.
155
+
* The app should call `finishTransaction()` to complete the purchase.
156
+
157
+
This is what is [recommended by Apple](https://developer.apple.com/reference/storekit/skpaymentqueue/1506003-finishtransaction):
158
+
159
+
> Your application should call finishTransaction(_:) only after it has successfully processed the transaction and unlocked the functionality purchased by the user.
160
+
161
+
* A purchase is **atomic** when the app unlocks the functionality purchased by the user immediately and call `finishTransaction()` at the same time. This is desirable if you're unlocking functionality that is already inside the app.
162
+
163
+
* In cases when you need to make a request to your own server in order to unlock the functionality, you can use a **non-atomic** purchase instead.
164
+
165
+
SwiftyStoreKit provides three operations that can be performed **atomically** or **non-atomically**:
0 commit comments