No Sound in ios 8 Parsing

This is strange, after updating my application to support iOS 8 push notifications sent via Parse (using the Parse toolbar), push notifications will not sound.

I found this duplicate in Stackoverflow, but the answer that was sent did not work for me: No sound in browser alert for ios8

  • I already checked the notification center, and messages and sounds are turned on.
  • Created a new clean build application
  • Checked that other push messages generate sounds in the application.
  • Used Parse rest api and set the default sound.

None of the things I tried worked.

Updated my application with Parse code:

// 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)]; } 

EDIT: I found a bug report on Facebook dev: https://developers.facebook.com/bugs/719233564823090/

+5
source share
1 answer

You can send your push notifications in JSON format, and not in text format in the web console, for example:

  {"aps":{"alert":"This is a Test","sound":"default"}} 

This is a workaround until Parse fixes this error.

+5
source

Source: https://habr.com/ru/post/1205185/


All Articles