Closed ExperimentsAndIdeas closed 7 years ago
So how this should be used on the client app? Where/when one should dispose the InAppBilling ?
In a finally after connecting.
Not required though from my testing.
I find nowhere where removing the TransactionObserver is mentioned/suggested on Apple Tech Note 2387 I may be missing something.
In a finally after connecting.
If I'm not wrong that would prevent out-of-band transactions. Doesn't make any sense.
maybe @makerofthings7 can provide docs or insights ?
Finally, to prevent delays when processing an IAP, make sure to add it to finish launching.
I've read all the docs regarding the TransactionObserver, and it's necessary to remove the observer to prevent the app from crashing.
One case is when a purchase occurs in the App Store (using a coupon), or a parental approval, or when the network connectivity is resumed.
To prevent this, call SKPaymentQueue.DefaultQueue.RemoveTransactionObserver(paymentObserver);
All of this is mentioned in Apple Tech Note 2387, along with justifications.