I have been testing In App Purchases for iOS in a sample app. I need to figure out if I can call refreshReceipt
API immediately at the launch to check user's eligibility for some trial period subscriptions etc.
I have called refreshReceipt
in AppDelegate's application:didFinishLaunching:options
method but it asks me for AppStore credentials, basically the Sandbox user's password. I was not expecting this behaviour as read from Apple docs. Is it something that is happening because of the sandbox environment or does it happen in Production environment as well.
Also, does Restore Purchase
trigger the AppStore login alert. Apple docs say it does, but recently I saw one of the music apps on my phone did not ask for credentials when I opted the option. It may be that they are not calling the StoreKit's restorePurchase API, rather using their own mechanism.