Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Remote Notifications not working when "content-available": 1

I can receive Push Notifications in my iOS app without problems, but if I try to send a Silent Notification adding "content-available": 1, I will not receive any notifications no matter the state of my app (even if it is running in the foreground)

I have checked the Remote Notifications checkbox. (or added remote-notification in .plist) and I have implemented application:didReceiveRemoteNotification:fetchCompletionHandler but didReceiveRemoteNotification only is called if I send a normal push notification and the app is running in the foregound

Any idea??

like image 263
user1285413 Avatar asked Dec 21 '25 12:12

user1285413


1 Answers

I have tested on iOS 7.0.6 to send a slient push with the payload:

{"aps":{"content-available":1}}

and worked fine, here is my userInfo object on Xcode:

2014-05-09 11:04:23.737 SilentPushTest[316:60b] PAyload {
    aps =     {
        "content-available" = 1;
    };
}

You can test sending push easily with this app:

https://bitbucket.org/jesuslg123/pushmebaby

Just need to add your app certificate with the name apns.cert and compile it.

like image 146
Jesuslg123 Avatar answered Dec 24 '25 08:12

Jesuslg123