简体   繁体   English

推送通知的接收和处理

[英]Push notification receive and handle

I have two problems. 我有两个问题。

  1. I implement notification, install in my phone but when I send notification from provider, I didn't receive any notification. 我实现了通知,将其安装在手机中,但是当我从提供商发送通知时,我没有收到任何通知。 But when I use another phone I receive notification. 但是当我使用其他电话时,会收到通知。 Is there any setting for receiving notification? 接收通知有什么设置吗?

  2. Where in my code I must implement code that must run when I click on "View button" on notification alert? 在通知警报中单击“查看按钮”时,我必须在代码中的哪些地方实现必须运行的代码?

1) Once there is an app installed that accepts notifications there will be a "Notifications" item in the iPhone Preferences just under "Wi-Fi". 1)一旦安装了接受通知的应用,iPhone首选项中的“ Wi-Fi”下将出现一个“通知”项。

2) There is nothing specific other than the standard APS registration on startup. 2)除了启动时的标准APS注册外,没有其他特定的内容。 On an application basis the app may want to connect to the server to provide feedback that the notification was received and the app was run. 在应用程序的基础上,应用程序可能希望连接到服务器,以提供有关已接收到通知且应用程序已运行的反馈。

The app should be using: 该应用程序应使用:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

Not

- (void)applicationDidFinishLaunching:(UIApplication *)application

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM