Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IAPHelper Not handling transactions at application launch? #34

Open
phasedarray opened this issue Aug 15, 2016 · 2 comments
Open

IAPHelper Not handling transactions at application launch? #34

phasedarray opened this issue Aug 15, 2016 · 2 comments

Comments

@phasedarray
Copy link

phasedarray commented Aug 15, 2016

@saturngod
From the Apple's document In-App Purchase Best Practices
https://developer.apple.com/library/ios/technotes/tn2387/_index.html

Transaction observer SHOULD be added to SKPaymentQueue at application launch, the reason is that some transaction may be still in purchasing status when user closes the app.
But IAPHelper doesn't initialise it self at launch. Moreover buyProductCompleteBlock in IAPHelper isn't initialised until buyProduct:onCompletion: or restoreProductsWithCompletion: is invoked. So the updatedTransactions will be lost before any purchase or restore if user relaunches the app.

Am i correct?

@saturngod
Copy link
Owner

yes, it's correct. That why , I use addTransactionObserver at object allocate and removeTransactionObserver at dealloc of IAPHelper class.

@phasedarray
Copy link
Author

but at that time, _buyProductCompleteBlock is still nil, customer code can't get any notification or callback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants