gpt4 book ai didi

ios - 当他从后台返回时,检测到应用程序被通知中心或通过他的图标重新打开了吗? UI应用程序状态背景

转载 作者:行者123 更新时间:2023-11-29 01:14:42 25 4
gpt4 key购买 nike

我需要帮助,有什么方法可以检测到应用程序在从后台返回时被通知中心或通过他的图标重新打开UIApplicationStateBackground

当应用程序关闭时,我可以通过 didFinishLaunchingWithOptions 中的 launchoptions 看到区别

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSDictionary *pushNotification = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];

if (pushNotification) {
//Tapped Notification when app is inactive
}
}

但是当应用程序从后台运行时,我不知道他们是否触摸了应用程序图标或通知。

最佳答案

检查 application:didFinishLaunchingWithOptions: 中的 options 对象.描述了检查 key here

关于ios - 当他从后台返回时,检测到应用程序被通知中心或通过他的图标重新打开了吗? UI应用程序状态背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35347553/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com