NSLog(@"push notification in process");
[[UIApplication sharedApplication]registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeAlert)];
Entering above code in appdelegate.m file in didFinishLaunchingWithOptions: method
I am getting error message as follows:
Error :
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
}
This could be due to a number of issues. See if any of the following fix it:
If these fail then the issue could be due to the provisioning profile in Xcode. If you created your provisioning profile before configuring the AppID for push, try regenerating and installing a new profile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With