Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to send a "silent" push notification on iPhone (without any alert to the user)?

I need to do it on a chat app to notice the client that there is new data to fetch from the server.

I know that technically it is possible with an empty payload (at least on ios 5 device it worked), but can Apple see it as abuse of service or is it OK to do it?

And is it technically possible on ios 4 device?

like image 635
Eyal Avatar asked Apr 12 '12 12:04

Eyal


1 Answers

Yes, increment only badge number, dont send sound and alert, So, there will be one badge on the App icon.

So, here unknowingly the badge number will be incremented to show that something has been recieved when user watches the app icon.

But your device won't recive alert or empty payload and won't recieve sound also because you asked for “silent” push notification on iPhone

and while configuring in AppDelegate, configure only badges

 [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge];

Hope this will be helpful for you

like image 189
Charan Avatar answered Sep 22 '22 04:09

Charan