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
}