Hi, i can successfully build my project using xcode workspace, can make an archive and upload to app store but recently i received nice warning from Apple:
Your delivery was successful, but you may wish to correct the following issues in your next delivery: Missing Push Notification Entitlement - Your app appears to register with the Apple Push Notification service, but the app signature’s entitlements do not include the “aps-environment” entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the “aps-environment” entitlement. Xcode 8 does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor’s Capabilities pane, or manually add the entitlement to your entitlements file. For more information, see Local and Remote Notification Programming Guide: Configuring Remote Notification Support.
The consequence is push notifications work on devices with ios11 but not with ios10. i spent all day on checking various options on xcode and found nothing to help me resolve that issue.
ps. I use phonegap-plugin-push 2.1.0 “PushPlugin”
ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.2
Cordova Platforms : ios 4.5.3
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
ios-sim : 5.0.13
Node : v6.10.0
npm : 3.10.10
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
I can’t really answer your question because even if I use the same version of the plugin I don’t face this problem. What I would suggest is removing/adding the platform again. Long long time ago I remember I add a problem after updating a version of the push plugin I solved doing so.
Otherwise maybe one of the following threads will helps you find something:
P.S.: I also have to add, I don’t use pro to ship my app. I open the Myapp.xcworkspace project in Xcode, build/archive the app and upload it with application loader.
So do I, that is the fastest way to build the app with phonegap-plugin-push, thanks for the links you provided, i had read both. The apple warning i got just after adding cordova-universal-links-plugin to the project. I had to regenerate provisioning profile with enabled Associated Domains and it was beginning of my problems with push notify. So now i can get push notifications on my dev devices (i.e. with development provisioning profile) but when i upload the archive to TestFligh, testers can’t get push notify at all
ps. before adding universal-links-plugin push notify worked both in dev and production mode
Finally i got rid of that apple warning (after 2 days digging in xcode).
So in theapp.xcworkspace i had to set ‘Automatically manage signing’, here is a nice tip: https://stackoverflow.com/questions/37806538/code-signing-is-required-for-product-type-application-in-sdk-ios-10-0-stic.
The second thing is manually setting ‘aps-environment’: in the file app_name.entitlements located in Resources folder add ‘APS Environment’ key to ‘production’ value.
Next: build, archive and when you use validate before export, on Entitlement list you can see ‘aps-environment’ set to ‘production’.
I’m having the same problem. Push Notifications are enabled for the App ID, in the provisioning profile and in the Capabilities.
Adding the aps-environment key manually to the generated *.entitlements file under Resources shouldn’t be the solution, since this file gets deleted if for some reason you need to remove the platform and it back again. If you forget to add again the key manually you end up with the same problem. What in your and my case is different to other environments that forces us to do this manual step? Why do others not have this problem?