I've been testing out the Silent Notification feature that is available since iOS 7.
My application is targeting iOS 7 and UP.
I'm testing on an iPhone6 device.
Everything seems to work great in my application when my iPhone is connected to the computer & Xcode is running the application. All silent notifications work 100% and they show up in my application as well.
However, if I stop Xcode & send a silent notification -- my device does not receive the silent notifications at all.
I have done a LOT of research but nothing has given me an answer nor has helped me determine what is going on.
I have not killed my application. So, that is not the issue. You can still see the application in the app switcher.
My application does receive regular push notifications (with and without Xcode). The issue is with Silent Notifications.
Found these (but they did not help me solve the issue):
- IOS 8 Silent push notification not working without Xcode
- iOS silent push notification only works when connected to xcode
I have added the "Priority" tag to my JSON payload as well... and still no luck.
This is my Payload:
$body['aps'] = array(
'content-available' => 1,
'alert' => $message,
'Priority' => 10,
'sound' => 'default'
);
I've even tried "priority" all lower-cased.
My phone does get the alert and it makes the sound. But, if a user selects the "app icon" instead of the banner alert -- it doesn't get the silent notification. This only happens when my application isn't connected and running from Xcode.
Also, I am using a Developer certificate and Provisioning Profile.
UPDATE 1:
Found out that the Priority setting is supposed to be apart of the binary notification not the APNS Payload.
I removed "priority" from payload and configured binary notification as Command 2.
See: https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html
Tested with Xcode. Everything works. Tested without Xcode. Still same issue. =(
UPDATE 2
I tested the application on an iPhone 4 Device. Silent Notifications work with or without Xcode on it. So, this must be an issue strictly with iOS 8 devices.
Updating title to reflect only iOS 8. I'm not sure how to fix this for iOS 8 devices. Anyone have any suggestions?