Reputation: 1
I'm getting this alert message while getting device token by using this code.
"Error Domain=NSCocoaErrorDomainCode=3000"no valid aps-environment'entitlement string found for application" Userinfo=0x1665f5b0 {NSlocalizedDescription=no valid 'app-environment'entitlement string found for application}
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)var_deviceToken
{
NSString *tokenString = [[deviceToken description] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]];
NSLog(@"Push Notification tokenstring is %@",tokenString);
self.deviceToken = tokenString;
}
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
NSString* s=[[NSString alloc] initWithFormat:@"%@",error];
UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"Device Token didn't recieve" message:s delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}
Upvotes: 0
Views: 95
Reputation: 300
The reasons for getting this issue is ,
Upvotes: 1