phonegap-build / PushPlugin

This repository is deprecated head to phonegap/phonegap-push-plugin
https://github.com/phonegap/phonegap-plugin-push
MIT License
1.32k stars 1k forks source link

no valid aps-environment entitlement string found for application #700

Open Tommy10802 opened 7 years ago

Tommy10802 commented 7 years ago

Hello everyone, i have a problem with push notification on iOS 10... it throws on register device id this error "no valid aps-environment entitlement string found for application" ... I have project in visual studio on windows and use remotebuild on mac to build for iOS... i try everything regenerate all certificates, enabling push notifications disabling push notifications, auto signing, manual signing but still it throws this error.. can anoyne help with that please?. Thanks a lot for any kind of help or advice.

Dmatafonov commented 7 years ago

I have the same issue. https://issues.apache.org/jira/browse/CB-11854

Dmatafonov commented 7 years ago

One of our users experiences the same on iOS 8.4.1

Looks close to the isssue http://stackoverflow.com/questions/27324020/no-valid-aps-environment-entitlement-string-found-for-application-on-app-store

Notifications worked and worked pretty good - except they never worked on iOs 10, but other iOs devices and Android were just fine. I thoght that it's an issue with iOs 10, but now, when we have the same case with iOs 8 I'm trying to figure out what should I do to update the app.

Any suggestions?

arifinWM commented 7 years ago

Hello, any update on this ?

Dmatafonov commented 7 years ago

It was fixed in newer versions of CLI. I've just compiled new app at build.phonegap.com and had no more troubles.

jjchambl commented 6 years ago

Not sure if this is the appropriate place for this comment, but I'll also point out that for these notifications to work on iOS, you need to run the project from XCode, not using the Ionic CLI. Ran into that problem myself.

ryaa commented 6 years ago

It took me a while to figure out what causing no valid aps-environment entitlement error. The problem was that there were two .entitlements files in XCode project. One is platform/ios//.entitlements and another one is platform/ios//Resources/.entitlements and the appropriate entitlements is present in the former file only while XCode is configured to use the latter. I updated the latter file manually and everything started to work. Another option to fix this is to change which .entitlements is used by XCode. This can be done in Build Settings --> Signing --> Code Signing Entitlements config param.

I'm not sure why there are two .entitlements files in XCode and one of them has APS Environmentkye and the other one does not. Could it be that the push plugin created the second one? And what is the correct location for the .entitlements file?

iugaliviu commented 4 years ago

It took me a while to figure out what causing no valid aps-environment entitlement error. The problem was that there were two .entitlements files in XCode project. One is platform/ios//.entitlements and another one is platform/ios//Resources/.entitlements and the appropriate entitlements is present in the former file only while XCode is configured to use the latter. I updated the latter file manually and everything started to work. Another option to fix this is to change which .entitlements is used by XCode. This can be done in Build Settings --> Signing --> Code Signing Entitlements config param.

I'm not sure why there are two .entitlements files in XCode and one of them has APS Environmentkye and the other one does not. Could it be that the push plugin created the second one? And what is the correct location for the .entitlements file?

Oh man!!!! This is gold right here. I did everything the right way, followed every tutorial, read every doc and could not get it done. This was the problem. I created a github account just for leaving this reply and to thank you for this!!

filizsalnur commented 6 months ago

I encountered the same issue. In the RunnerProfile.entitlements file, there was aps-environment development, but it was missing in the Runner.entitlements. I removed it from the first and added it to the second, and it worked.