I am working on an app, which is available to receive notifications from server. I used UILocalNotification, and my app can receive informations from server with foreground and background mode, but I don't know how my app can do it when it is killed by user. In fact, I know that Facebook message app can do it easily, we always receive notifications any time. Please, give me some solutions, thanks so much.
Asked
Active
Viewed 791 times
2
-
1http://stackoverflow.com/questions/24899257/how-to-setup-push-notifications-in-swift – onemillion Jul 07 '16 at 10:39
2 Answers
1
plz read this link
push notifications payload look like this
{
"aps": {
"badge": 10,
"alert": "Hello world!",
"sound": "Default"
}
}
if you add message in alert. then your notification will show when your app in background or killed.

balkaran singh
- 2,754
- 1
- 17
- 32
0
Read this link for all the steps which you have required to setup the push notification : https://www.raywenderlich.com/123862/push-notifications-tutorial

Bhadresh Mulsaniya
- 2,610
- 1
- 12
- 25
-
thank you, this link is useful for me. But when I read it, I also can not complete way how to send notifications to Apple Push Notification Sevices :(( – Minh Hoàng Jul 12 '16 at 04:23
-
-
ok, I found out the way to handle the trouble. I read this link and customize .php file there and I also create a server which manager all notifications I wanna send to app (when, what be send, how to send to android app and iOS app together...) :)) Moreover, someone also use Firebase library (Google cloud message) to do it. :)) – Minh Hoàng Aug 01 '16 at 07:59