Are push notifications stored somewhere on iphone?
37,623
Push notification is not stored into application memory. But you can handle them as you want. There are mainly two case in which we need to handle the push notification:
1) Application is closed/background mode 2) Application is active mode
1) To Handle push when app is not running or in background, you need to click on push notification pop and it will open the application. Below is the code to handle this case:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
if (launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey]) {
self.isNoti = TRUE;
NSMutableDictionary *dic = [[NSMutableDictionary alloc] initWithDictionary:[launchOptions valueForKey:UIApplicationLaunchOptionsRemoteNotificationKey]];
// Do you stuff
}
return YES;
}
2) If your application is in active state:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))handler
{
@try {
NSLog(@"Push Notification!!!");
}
![peekpoke](https://i.stack.imgur.com/l3a57.png?s=256&g=1)
Author by
peekpoke
Updated on July 05, 2022Comments
-
peekpoke almost 2 years
If yes, how it's possible for the user to re-read them again ? By coding, how do you read them to display them in your app ?
-
mjmayank over 7 yearsYou can change the sort order in Settings->Contacts->Sort Order to make it sort by first name