1

如何将标准推送通知发送到报亭应用程序?当我说“标准”时,我指的是随消息弹出的典型警告框。

我正在使用 Urban Airship 并且“内容可用”推送工作正常,如下所示:

 {"aps": 
        {
         "content-available": 1
        }, 
         "device_tokens": ["1234ABCDKKGGOGOGG85986598750870870875708ASD"]
 }

但是当我尝试发送标准推送时,警报永远不会弹出,我的代表

application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo 

不叫:

     {"aps": 
        {
         "alert": "Hi, from Urban Airship!"
        }, 
         "device_tokens": ["1234ABCDKKGGOGOGG85986598750870870875708ASD"]
 }
4

1 回答 1

2

Forgot to register for the alert (standard) push, which is set by adding the constant UIRemoteNotificationTypeAlert

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeNewsstandContentAvailability | UIRemoteNotificationTypeAlert];
于 2012-09-21T16:27:33.503 回答