The device is running on iOS 8.1
I'm using xCode 6.1 to compile the app.
This is the code to register for push
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
{
[application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
[application registerForRemoteNotifications];
}
else
{
[application registerForRemoteNotificationTypes: (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
}
It works fine as the app registers with the server.
The PEM files are also done correctly as I can send a push to my device using sandbox APN.
When I print my JSON payload from didReceiveRemoteNotification
I get this:
{
aps = {
alert = "Test Push Message";
};
}
The issue is when I receive my push (even when the device is set to loud) it doesn't play a sound.
From my knowledge, if you don't specify a sound in the JSON payload it should play the default OS sound.
In my App notification settings on the phone the sound is enabled by default because when I register I specify UIUserNotificationTypeSound
.
Anyone else come across this issue?