如何知道是否收到推送通知(How to know if push notification recieved)

编程入门 行业动态 更新时间:2024-10-25 10:27:40
如何知道是否收到推送通知(How to know if push notification recieved)

我在我的应用上使用推送通知。 当我的应用程序通过通知打开时,我正在执行一些逻辑; 我正在使用它

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

方法。

我可以知道,当我的应用程序收到通知时,没有选择它吗?

I'm using push notification on my app. I'm executing some logic when my app is opened via notification; I'm using for it

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

method.

Can I know, when my app recieving notification, without oppening it?

最满意答案

当您的应用处于后台或处于非活动状态时,您可以推送本地通知,这样您就可以看到推送内容,不能打开它。

You can push a local notification when your app is in background or inactive, so you can see the push content, no to open it.

更多推荐

本文发布于:2023-08-07 19:49:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1465946.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:通知   push   recieved   notification

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!