I try to implement push notification in my iPhone application. I have create Provisioning Profile and App-id for push notification and add this certificates into Xcode. Connect iPhone device to mac system and build application through device for read Device token using the following code.
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
NSLog(@"didRegisterForRemoteNotificationsWithDeviceToken:\n%@", deviceToken);
}
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
NSLog(@"didFailToRegisterForRemoteNotificationsWithError:%@", [error localizedDescription]);
}
But it returns error.. like
didFailToRegisterForRemoteNotificationsWithError:no valid 'aps-environment' entitlement string found for application 2012-07-18 14:18:08.597 Z2NotifyMe[1874:707] didFailToRegisterForRemoteNotificationsWithError:Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x11fee0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}
I have remove all old certificates in Xcode and my device, then re-create all certificate newly then execute above same code it returns same above error.
Please help solve this problem.
Thanks..