Click here to Skip to main content
15,885,985 members

Comments by Aqueel (Top 2 by date)

Aqueel 2-Jul-12 1:12am View    
So have you tried my solution? How is it going now?
Aqueel 29-Jun-12 7:42am View    
Ok now send me code for MakePaymentServiceHit method as well. If you look into the log, it says,"JAYPORE failed to resume in time". It looks like app was not able to exit applicationDidBecomeActive in timely manner. It happens when some operation was in progress and it did not finish within specified time and iOS purged your app from the memory. Remember that when your app enters background, applicationDidEnterBackground and applicationWillResignActive are called. This method is defined in AppDelegate class of your project. And when app comes to foreground, applicationDidBecomeActive is called.

According to iOS programming guidelines,

Your delegate’s applicationDidEnterBackground: method has approximately 5 seconds to finish any tasks and return. In practice, this method should return as quickly as possible. If the method does not return before time runs out, your application is killed and purged from memory. If you still need more time to perform tasks, call the beginBackgroundTaskWithExpirationHandler: method to request background execution time and then start any long-running tasks in a secondary thread. Regardless of whether you start any background tasks, the applicationDidEnterBackground: method must still exit within 5 seconds.

So make sure, when your app enters applicationWillResignActive method, it finishes all its tasks within 5 seconds and if the task is big enough to not to finish within this time, you should kill such thread or cancel that timer.

For more information, please read the documentation at
http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html
I hope that helps