NSLog(@"push notification in process");
[[UIApplication sharedApplication]registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeAlert)];
将以上代码添加到
appdelegate.m
文件的didFinishLaunchingWithOptions:
方法中后,我遇到了以下错误信息:错误:
Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x20021380
{
NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application
}