The following two reference links of the certificate are very good:
Note that the warning notification is actually displayed by yourself. The specific process is as follows:
And push messages have their own unique json format, apple's api said very clearly: http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW10
{
"Aps": {"alert": "Message received ed from Bob "},
"Acme2": ["bang", "whiz"]
}
Find an Open Source apple push server: https://github.com/stefanhafeneger/PushMeBaby in github
Easy to use
1. Import your cer file (p12 file not required on obj c) to the project.
2. Modify the initialization statement
-(Id) init {
Self = [super init];
If (self! = Nil ){
Self. deviceToken = @ "94b77ce5 bca83eb2 af0b0827 a7bbs633 3efc6ffdd e4fdw20a dd8cd2d7 5222c2e2 ";
// Set device token,
-(Void) application :( UIApplication *) application didregisterforremotenotifswswithdevicetoken :( NSData *) The deviceToken obtained
Self. payload = @ "{\" aps \ ": {\" alert \ ": \" This is some fancy message. \ ", \" badge \ ": 1 }}";
/// Set alert information
Self. certificate = [[NSBundle mainBundle] pathForResource: @ "aps_development" ofType: @ "cer"];
// Set the certificate path
}
Return self;
}
3. Run
Good luck