我目前在尝试删除IOS本地和远程通知中的操作按钮时遇到问题。
对于远程通知,我使用的是JavaPNS库。
PushNotificationPayload payload = PushNotificationPayload.complex();
try {
payload.addCustomAlertActionLocKey(null);
...
对于本地通知,我已将UILocalNotification的hasAction属性设置为NO。
我已尝试在addCustomAlertActionLocKey中输入空值,但操作按钮在通知中仍显示为“启动”。满足IOS要求的JSONObject输出如下所示:
{"aps":{"alert":{"body":"hello there","action-loc-key":null},"sound":"somesound","badge":1}}
我目前正在运行带有JDK 1.6和GlassFish server 3.1的Netbeans IDE 7.0.1。 IOS应用程序基于IOS 5构建,使用xcode 4.2。