[英]iOS push notifications only showing badges. need sounds and banners too
我目前正在使用相同的方法向2個不同的應用程序發送推送通知,但是其中一個僅顯示Badges 。 如果我從“設置”中訪問“ 通知 ”,則僅顯示“ 徽章 ”,而不顯示“徽章,聲音,橫幅” 。
我正在使用https://github.com/phonegap/phonegap-plugin-push插件。
我嘗試重置,因此它將請求第一次推送請求,嘗試了另一台設備,並反復調用了插件init
函數,該函數調用
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]
但結果相同。
如果我在鎖定屏幕上,它將顯示出來。 如果我檢查通知中心在那兒。
謝謝。
我正在這樣設置通知:
UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings];
工作正常。 希望能有所幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.