收到远程通知时自动启动 iPhone 应用程序
是否可以在收到远程通知时自动启动iPhone应用程序,无论它是关闭还是在后台?我将不胜感激你的帮助。 提前致谢, 莎拉
Is it possible to launch iPhone application automatically when it receives remote notification whether it is closed or in the background? I would appreciate your help.
Thanks in advance,
Sarah
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
简短回答:收到新通知时,您无法自动启动应用程序。
当推送通知发送到 iPhone 时,用户会看到一个看起来像新短信的视图。
然后,用户可以选择打开您的应用程序或关闭此视图。
Short answer : You can't automatically launch your app when a new notification is received.
When an push notification is sent to an iPhone, the user is presented a view that is looking like an new SMS.
The user has then the option to open your application or dismiss this view.
您应该检查一下:
http:// developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/HandleTasks/HandleTasks.html
并阅读“启用本地和推送通知”下面的内容,在这里您将找到问题的答案。
然后阅读以下内容:
如何实现它。
快乐编码!
// 雅各布
You should check this out:
http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/HandleTasks/HandleTasks.html
and read beneath Enabling Local and Push Notifications, Here you will find an answer to your question.
Then read this:
http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/IPhoneOSClientImp/IPhoneOSClientImp.html#//apple_ref/doc/uid/TP40008194-CH103-SW1
How to implement it.
Happy Coding!
// Jakob