rashfmnb rashfmnb -4 years ago 207
iOS Question

Fail to register for remote push notification

I am getting the error in setting up the push notification on an iPhone 5 with iOS 8 :

2015-04-29 00:23:14.688 pushNotificationTest[192:6284] Did Fail to
Register for Remote Notifications 2015-04-29 00:23:14.698
pushNotificationTest[192:6284] Error Domain=NSCocoaErrorDomain
Code=3000 "no valid 'aps-environment' entitlement string found for
application" UserInfo=0x15e89820 {NSLocalizedDescription=no valid
'aps-environment' entitlement string found for application}, no valid
'aps-environment' entitlement string found for application Message
from debugger: failed to send the k packet

I use this link to implement it


I already tried these work around provided by different people on this link :

Getting an error from push notification

code that i am using to register

UIUserNotificationSettings *settings=[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil];

[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
[[UIApplication sharedApplication] registerForRemoteNotifications];

Answer Source

i have resolved it was just naming conflict between bundle and provisioning profile i make the names same after creating the new project

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download