Been Stuck on this one issue for quite a while now. Trying to run the following line:
[application registerForRemoteNotifications];
and getting the error
(via: - (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
{
NSLog(@"Failed to get token, error: %@", error);
})
2015-04-03 16:06:42.753 TownHall[696:169453] Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x17426a1c0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}
Tried some of the stuff with the following associated post https://mcmap.net/q/150452/-how-to-fix-quot-no-valid-39-aps-environment-39-entitlement-string-found-for-application-quot-in-xcode-4-3 but little luck.
This includes: 1) Recreating a provisioning profile 2) Recreating ID and checking that it matches and has push enabled 3) Clean and rebuild, etc 4) Creating of new certificates 5) Refresh with Xcode > Preferences > Accounts > View Details (Select your account)
Wondering if anyone has any solutions for this?
Happy to share any other information that people might find useful for solving this problem.
Thanks a lot in advance for help!