我想要一个帮助,是否有任何方法可以通过Notification Center或通过他的Icon从后台返回来检测应用重新打开? UIApplicationStateBackground
当应用关闭时,我可以通过launchoptions
didFinishLaunchingWithOptions
看到差异
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSDictionary *pushNotification = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
if (pushNotification) {
//Tapped Notification when app is inactive
}
}
但是,当应用程序来自后台时,我不知道他们是否触摸了应用程序图标或通知。