简体   繁体   中英

Push Notifications on iPhone App

I have successfully implemented push notifications to my app. The next step is, if the user receives a notification about this certain document, he/ she clicks it and it brings them to this document.

At the moment, I can receive the notification, but it only brings me to the app.

How can I do this?

Thanks.

I am not clear with your question. But you should handle push notifications in the following methods,

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
//Handle here
}

and

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{    
 NSDictionary *tmpDic = [launchOptions objectForKey:@"UIApplicationLaunchOptionsRemoteNotificationKey"];
if (tmpDic != nil) {
        //Handle here also
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM