可以区分用户手动恢复应用程序或接受推送通知吗?
我也想处理推送通知参数。
答案 0 :(得分:2)
我认为您正在寻找didReceiveRemoteNotification
,这是推送通知到达时调用的方法。
您需要查看UIApplication Delegate Protocol Reference!还有其他一些方法可用于远程通知。
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
if ( application.applicationState == UIApplicationStateActive )
// app was already in the foreground
else
// app was just brought from background to foreground
...
}