2014-10-17 109 views
4

我遇到了推送通知到iOS8設備的問題。一切工作正常,但推動不振鈴,只出現在屏幕上。 我通過儀表板發送正常推送,默認情況下啓用聲音。我測試了iPhone4上(的iOS 7.1.2),iPhone5的(的iOS 7.0.4),它工作正常,但在iPhone上沒有聲音與iOS 8 感謝ios8的解析推送通知中沒有聲音

編輯:

1)我們有已經修改了我們的代碼來處理ios8的更改推送通知註冊。下面是代碼片段:

// Register for Push Notitications, if running iOS 8 if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) { UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound); UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes categories:nil]; [application registerUserNotificationSettings:settings]; [application registerForRemoteNotifications]; } else { // Register for Push Notifications before iOS 8 [application registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound)]; }

2)改變的任何和所有的配置設置不任一幫助,也不會重新啓動設備。

+0

[解析通過發送推送通知時無聲音]的可能的複製(http://stackoverflow.com/questions/25452560/no-sound-when-sending-push-notifications-through-parse) – 2015-10-16 13:27:35

回答

0

推寄存器方法在iOS的8.Check以下幾種可能改變..

1)檢查是否有聲音註冊推送通知爲this link

2)另一種可能是聲音可以在通知中關閉。檢查設置 - >通知中心 - >點擊應用程序並啓用聲音。

+0

請參閱我們的編輯。我們遵循Parse建議:https://www.parse.com/apps/quickstart#parse_push/ios/existing – 2014-10-20 13:47:44

8

似乎你需要這個請求JSON:"sound": "default"。空白用於工作,但現在需要「默認」來使用默認聲音。