Search code examples
iphonebackgroundjailbreak

Background iPhone app for Jailbroken phones


I develop apps for jailbroken phones, and I need my app to be backgrounded and to be able to keep running as usual when backgrounded. On iOS3.0, I would just block the thread at applicationWillTerminate, and that'd be it. But it seems that the fast app switching method in 4.0 is disabling applicationWillTerminate, so I can't use that anymore. I've tried overriding applicationSuspend by calling it, but that doesn't appear to work either. Do you guys have any idea how to do this? Thanks


Solution

  • Maybe you need to intercept the new methods triggering the quasi-backgrounding process set by Apple.

    -(void)applicationWillResignActive

    -(void)applicationDidEnterBackground

    -(void)applicatonWillEnterForeground

    -(void)applicationDidBecomeActive