How to use Push Notifications

2019-06-19 08:37发布

问题:

Regarding push notifications. How do I get the provision from APNS to implement push notifications in to my application. Help me guys.

回答1:

start from these series

http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12

iOS developers love to imagine users of their awesome app using the app all day, every day. Unfortunately, the cold hard truth is that users will sometimes have to close the app and perform other activities. Laundry doesn’t fold itself, you know :]

Happily, push notifications allow developers to reach users and perform small tasks even when users aren’t actively using an app!

Push notifications have become more and more powerful since they were first introduced. In iOS 9, push notifications can:

  • Display a short text message
  • Play a notification sound
  • Set a badge number on the app’s icon
  • Provide actions the user can take without opening the app
  • Be silent, allowing the app to wake up in the background and perform a task

This push notifications tutorial will go over how push notifications work, and let you try out their features...



回答2:

I followed the steps mentioned in raywenderlich tutorial. It's some what easy to send Push notifications to my iPhone app by using my system as the temporary server(ie, sending the message by running the PHP code from the Terminal window).

But, while going for production and dynamic messages for different users at different time, it's very tough for me to set the service in a server.

So, I go with third party server to send Push Notifications. - Parse.com

Tutorial for how to use that API.

Documentation about the installations of the application.

Here, we have a tag parse.com for questions about this process.