Foreword: Push is divided into local push and remote push.
The difference between the two is that local push is usually timed push, regular push, or location push. and remote push more diversified, can meet the high requirements. Of course, remote push requires server-side development, the development process is more complex.
1, local push only need to write code on the client, the implementation is simple and easy.
(1) Local push can also receive local push messages if the app is not turned on. Will walk this entrance method
-(BOOL) application: (uiapplication *) application didfinishlaunchingwithoptions: (nsdictionary *) Launchoptions
(2) The app can receive push messages in the background. Click on the push message to open the app and go
-(void) application: (uiapplication *) application didreceivelocalnotification: (uilocalnotification *) notification;
(3) The app does not receive push messages when it is running in the foreground, but the Uiappdelegate method
-(void) application: (uiapplication *) application didreceivelocalnotification: (uilocalnotification *) notification; Automatically callback the contents of the message
IOS APNs Push