【发布时间】:2014-10-17 11:54:23
【问题描述】:
我遇到了向 iOS8 设备推送通知的问题。一切正常,但推送没有响起,只出现在屏幕上。 我通过仪表板发送正常推送,默认情况下启用声音。我在 iPhone4 (iOS 7.1.2)、iPhone5 (iOS 7.0.4) 上测试过,运行良好,但在 iOS 8 上没有声音。 谢谢
编辑:
1) 我们已经修改了代码来处理 ios8 的更改推送通知注册。下面是代码sn-p:
// 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) 更改任何和所有配置设置也无济于事,重启设备也无济于事。
【问题讨论】:
标签: push-notification parse-platform ios8 audio