????IOS????????????????????????:
????????Push SSL Certification
????IOS????????Push????????DeviceToken
???????Provider??APNS????Push???
????IOS?????????????APNS?????????
????????Push SSL Certification
???????developer.apple.com???????μ?App ID??????ID??Bundle Identifier??????????????????????Push???IAP????????? com.soso.sosoimage??
??????App IDs?б???棬??????????app id?????Configure?????????Configure App ID???棬???"Enable for App Push Notification service"?????Development Push SSL Certificate??е?Configure?????????"Apple Push Notification service SSL Certificate Assistant"?????????????????????????????????????Certificate??
???????Development Push SSL Certificate??????????????Keychain Access????????p12????????á?????????????????????????
??????developer.apple.com??????????μ?Provisioning Profile???????????????????Push?????App ID?????????????????
????IOS????????Push????????DeviceToken
????????????????info.plist??????Bundle identifier?????????Bundle Id??Com.soso.sosoimage???趨Code Signing Identity?????????Provisioning Profile??
??????????????е???????????′???.
????[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
??????????????????????????????????????Setting??????????????????????????????
??????AppDelegate.m?????????????.
//iPhone ??APNs?????????deviceToken?????????
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
NSString* dt = [[deviceToken description] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]];
NSLog(@"deviceToken:%@"?? dt);
}
//???push??????? ?? ???????????????????????
- (void)application:(UIApplication *)app didFailToRegisterForRemoteNotificationsWithError:(NSError *)err
{
NSLog(@"Push Register Error:%@"?? err.description);
}
???????DeviceToken????????Provider??
???????Provider??APNS????Push???
????Provider????????????????APNS??????????????????????к????????????????javapns ( http://code.google.com/p/javapns/ )??
?????????Provider??????DeviceToken?????????????????????Provider???????????
???????javapns??????????jar?bcprov-jdk15-146.jar?? log4j-1.2.15.jar?? JavaPNS_2.3_Alpha_5.jar??
????????浼????P12???????Provider??????????