用户响应苹果推送通知服务 [英] Apple Push Notification Service on user response

查看:188
本文介绍了用户响应苹果推送通知服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法来跟踪用户的响应时,该消息已推到用户设备(关闭查看之间选择)?

Is there a way to track user response (the choice between the 'View' and 'Close') when the message has been push into the user device?

感谢您。

推荐答案

您的应用程序是不是如果用户点击关闭通知;但是,如果用户点击查看,您的应用程序被启动,则可以检测到它是从一个通知推出 - 通知的有效载荷传递给<一个href=\"https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/application%3adidFinishLaunchingWithOptions%3a\"相对=nofollow>应用程序中:didFinishLaunchingWithOptions:

Your app is not notified if the user clicks "Close"; but if the user clicks "View", your app is launched, and you can detect that it was launched from a notification -- the notification's payload is passed to application:didFinishLaunchingWithOptions:.

另外,不要忘记在您的应用程序可能已经在通知中来运行的情况。在这种情况下,你的<一个href=\"https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/application%3adidReceiveRemoteNotification%3a\"相对=nofollow>应用程序:didReceiveRemoteNotification:功能被称为

Also, don't forget about the case where your app might already be running when the notification comes in. In that case, your application:didReceiveRemoteNotification: function will be called.

全部细节<一个href=\"https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/IPhoneOSClientImp/IPhoneOSClientImp.html\"相对=nofollow>这里。

这篇关于用户响应苹果推送通知服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆