On iOS, how can my app get the notification data that it received while the phone was in the background?

前端 未结 4 542
醉梦人生
醉梦人生 2021-01-24 06:52

Is there a way in AppDelegate to get a queue of all the notification data? (Once the user opens the app).

4条回答
  •  臣服心动
    2021-01-24 07:20

    Try this in your app delegate:

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

提交回复
热议问题