Reputation: 881
I am using push notification using urban airship in my application using the documentation
I write the code as follows
NSMutableDictionary *takeOffOptions = [[[NSMutableDictionary alloc] init] autorelease];
[takeOffOptions setValue:launchOptions forKey:UAirshipTakeOffOptionsLaunchOptionsKey];
[UAirship takeOff:takeOffOptions];
[[UIApplication sharedApplication]
registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert)];
but I receive following error log in my console.
did Fail To Register For Remote Notifications With Error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0xce2a310
I twice checked documentation and implement the code
On the site of urban airship it shows msg that "no device token found" then what should be the problem.
Upvotes: 1
Views: 1049
Reputation: 20021
aps-environment is the key value which is appearing in your provisioning profile.To hav this key in this profile ur profile must be registered for push notification service.
Use development credentials for development server and production credentials for production server.
To do : delete your provision profile from the xcode and download a new one from developer site which is configured.
Upvotes: 0
Reputation: 11338
Try the below steps :
The problem is indeed the provisioning profile -- this is iOS reporting it, so there's no way around it. Here's my suggestion:
That should make sure Xcode loads the right profile and installs the app; I've seen it fail silently, so being thorough is your best bet.
You can search more about this at where I found above solution : https://support.urbanairship.com/customer/portal/questions/13141-push-error-failure-to-register-on-iphone
Upvotes: 1