您的位置:首页 > 移动开发 > IOS开发

iOS接收远程通知

2016-12-14 11:07 267 查看
App在前台或后台的情况下,点击通知栏里的通知会走如下的代理方法:

iOS 10.0之前:

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary
*)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler{

}

iOS 10.0之后:

- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse
*)response withCompletionHandler:(void(^)())completionHandler{

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息