Hi all,
After doing some survey related to In-App Purchase, I found that it is good practice if register SKPaymentQueue on launch to collect pending transactions. That is addTransactionObserver in didFinishLaunchingWithOptions method.
But I am thinking if I addTransactionObserver when app launch, where and when I have to remove transaction observer? If I didn't remove transaction observer, will the app get crash? So far I am addTransactionObserver when my store front is loaded (in viewDidLoad of my store front) and removeTransactionObserver when my store front is unloaded (in viewDidUnload of my store front)... Is it a correct way?
Normally where you all addTransactionObserver?
Please let me know if my questions are not clear. Any comments and suggestions are welcome. Thanks a lot.
After doing some survey related to In-App Purchase, I found that it is good practice if register SKPaymentQueue on launch to collect pending transactions. That is addTransactionObserver in didFinishLaunchingWithOptions method.
But I am thinking if I addTransactionObserver when app launch, where and when I have to remove transaction observer? If I didn't remove transaction observer, will the app get crash? So far I am addTransactionObserver when my store front is loaded (in viewDidLoad of my store front) and removeTransactionObserver when my store front is unloaded (in viewDidUnload of my store front)... Is it a correct way?
Normally where you all addTransactionObserver?
Please let me know if my questions are not clear. Any comments and suggestions are welcome. Thanks a lot.