In the delegate.m application file, you need to activate an alarm or local notification when the application has entered the background mode:
- (void)applicationDidEnterBackground:(UIApplication *)application
or
- (void)applicationWillResignActive:(UIApplication *)application
(depending on your needs) Additional documentation can be found here:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html
My suspicion is that you configured the application only to disable the alarm after –application:didFinishLaunchingWithOptions: and -application:didReceiveLocalNotification:
which is the default.
There are many other options:
Monitoring application state changes
- Applications: willFinishLaunchingWithOptions:
- Applications: didFinishLaunchingWithOptions:
- applicationDidBecomeActive:
- applicationWillResignActive:
- applicationDidEnterBackground:
- applicationWillEnterForeground:
- applicationWillTerminate:
- applicationDidFinishLaunching:
Managing Application Recovery
- Application: shouldSaveApplicationState:
- Application: shouldRestoreApplicationState:
- Application: viewControllerWithRestorationIdentifierPath: encoder:
- Application: willEncodeRestorableStateWithCoder:
- Application: didDecodeRestorableStateWithCoder:
Providing a window for the storyboard window property Controls the default orientation of the interface
- Application: supportedInterfaceOrientationsForWindow:
URL Resource Open
- Application: OpenUrl: sourceApplication: annotation:
- Application: handleOpenURL:
Status Bar Change Management
- Application: willChangeStatusBarOrientation: Duration:
- Application: didChangeStatusBarOrientation:
- Application: willChangeStatusBarFrame:
- Application: didChangeStatusBarFrame:
Reply to system notifications
- applicationDidReceiveMemoryWarning:
- applicationSignificantTimeChange:
Remote Notification Handling
- Application: didReceiveRemoteNotification:
- Application: didRegisterForRemoteNotificationsWithDeviceToken:
- Application: didFailToRegisterForRemoteNotificationsWithError:
Respond to content protection changes
- applicationProtectedDataWillBecomeUnavailable:
- applicationProtectedDataDidBecomeAvailable:
source share