Push notifications can give users hints when the app is not up or running in the background. As a result, many application developers and companies use it to promote their products. Pushing your product through this channel is a good choice, but be sure to follow the minimum ethical code (don't push your notifications when the user sleeps), or the user will be relentless in blocking your app's notifications or even uninstalling your app.
First, how many "notifications" Apple has.
In fact, there are 3 different "notifications" in Apple's Mac OS X and iOS-developed APIs, including: Broadcast notifications, local notifications, and push notifications. The push notification and remote notification are a concept.
Two, broadcast notice.
Broadcast notification is the communication mechanism in the observation mode, and the problem is that it can realize the communication of an object to multiple objects in the same process, which is very widely used when the asynchronous call returns the result to multiple objects.
Three, local notification.
Local notifications can be used on iOS devices, which can be immediately notified or sent out after a scheduled time.
Four, push notifications.
Push notifications are also called remote notifications, and push notifications can be applied not only to iOS devices, but also to Mac OS X10.7 version after the Apple Computer, the application scenario is that we want to remotely push the user some SMS notification, even if it should be used not in the foreground, but also hope that users can receive notifications, such as: Stock information, user installation view stock information application, as a stock information provider can push stock information to these users of the device.
Push notifications, in addition to running the rationale and local notifications, users see the form of notification and management are the same, they have sound prompts, the way of notification is also a banner display and reminders are displayed, but also placed in the Notification Management Center.
Five. Export the P12 file for the SSL certificate.
In programming, you need to use the P12 format file, p12 the private key used to hold the personal certificate, usually containing the protection password, which is in binary format.
Six, iOS client programming.
Push notification technology works on both Mac OS X and iOS systems. The programming of the iOS Client Push notification is simple, and the key to programming is to get the token, which is returned from APNs, and then the content is given to the provider.
Seven, push service side programming.
In the push specific process is not directly from the content provider, directly to the user device, but the service program and APNs communication to establish a trust connection, and then push the data to APNs, and then by APNs using a secure channel to push the user device.
Reference: "iOS network programming and cloud applications-best practices"
"Book notes" ios-release your promotional messages-push notifications