问题描述
当应用程序处于后台时接收到远程推送通知时,应用程序进入applicationDidBecomeActive。从那里,我如何从通知中访问数据的NSDictionary?
When receiving a remote push notification as the application is in the background, the app enters applicationDidBecomeActive. From there, how can I access the NSDictionary of data from the notification?
推荐答案
通知数据在应用程序中传递到您的应用程序:didReceiveRemoteNotification:
。如果你想在 applicationDidBecomeActive:
中处理它,你应该将它存储在 application:didReceiveRemoteNotification:
code> applicationDidBecomeActive 。
The notification data is delivered to your app in application:didReceiveRemoteNotification:
. If you want to process it in applicationDidBecomeActive:
you should store it in application:didReceiveRemoteNotification:
and read it again in applicationDidBecomeActive
.
这篇关于如何访问applicationDidBecomeActive上的远程推送通知数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!