These days in the study of Apple's notification push mechanism, also made a simple example program, has not been integrated into the project, due to the time relationship, first write a synopsis:
One, generate certificate Signing Request (CSR) through Keychain access (Ketchain access);
II. Enter iOS Provisioning Portal, create AppID or update the configuration, activate the Enable for Apple Push Notification service option, and generate the certificate file with the CSR;
Third, install the certificate and export the P12 file, select the installed certificate, select Export;
Iv. generate AppID corresponding profile files on the developer website and install profile files;
Create the project, bind the corresponding bundle identifier (AppleID, note the app ID Prefix not included), and specify the profile file just installed, the program includes the following parts;
1. Registering a remote Notification service
[Application Registerforremotenotificationtypes:uiremotenotificationtypebadge | Uiremotenotific. Ationtypealert | Uiremotenotificationtypesound];
2. Obtain device token and save device token to the notification server;
3. Handling the event after receiving the notification;
Vi. writing server-side programs
Server program has two main functions: first, save device token; second, push notifications to APNs
iOS Push Message Instance tutorial