Michel Michel - 1 year ago 129
iOS Question

Call back at iTunes login prompt appearance

When handling inApp purchase (using Parse.com) in an iOS app, the user clicks BUY and waits for the iTunes login (or enter password) prompt to come up.
During the waiting time, I display and activityView to ask the user to wait.
Then when the prompt shows up, I need to clean this activityView.
What is the call back function I need to put the code into?
Is there something like loginPromptDidAppear? From which I could clean off the activityView.

Answer Source

As the prompt is issued by iOS, not your app, you will get a call to the applicationWillResignActive method in your app delegate, just as you would if a phone call is received.

You should be able to track your app operation (i.e. purchase initiated) and react accordingly when your app resigns active state.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download