Push Plugin, no valid 'aps-environment' with "ionic run" on iOS

Hi all,

i have an app using Push-Plugin. On iOS i have the problem that the app failed to initialize the push plugin when i use the ionic cli with “ionic run ios”:

Error: no valid ‘aps-environment’ entitlement string found for application

When i open the project in xcode and run/install the app from there all work fine.
Somebody any idea what the problem can be?

Thanks a lot

1 Like

What plugin are you using and how did you install it?
Maybe quick and dirty fix: Remove the ios platform and add it again. This resets all the created stuff, sometimes helps to fix issues.

Go to Xcode -> Target -> Capabilities Tab -> Turn on “push notifications” …

For reference see this doc


That’s the manual way, for sure. Shouldn’t the push plugin normally take care of this automatically in the background when being added to the platform/project?

I have installed the plugin over the command line:

cordova plugin add phonegap-plugin-push

and configure the sender id in the config.xml

I have already tried to remove the ios platform and add it again and also to configure push notifications over the Xcode, but both don’t effect the error when i run/build the application over the ionic cli. Over xcode-build all is fine…

Normally you add the ID via the install command:
Also at the end of this “headline”, before “Android details”, all taken care of?

By the way, which version of the plugin are you using?

I have now remove the platform and the plugin and followed the mentioned article.
I have now the following entries created:


    <plugin name="phonegap-plugin-push" spec="~1.10.3">        
<variable name="SENDER_ID" value="xxxxxxx" />    


  "cordovaPlugins": [
      "variables": {
        "SENDER_ID": "xxxx"
      "locator": "phonegap-plugin-push"

the code to register the app:

  const pushOptions: PushOptions = {
      android: {
        senderID: 'xxxxx',
        "sound": true,
        "forceShow": true
      ios: {
        alert: 'true',
        badge: true,
        sound: 'false'

    const pushObject: PushObject = this.push.init(pushOptions);
    pushObject.on('registration').subscribe((data: any) => {
      //never called

Android: all fine
ios: the same error

Additional ideas?
Thanks a lot

1 Like

Did you resolve this issue? I have the same problem with ionic package and muy certificates and profiles are ok

1 Like

Did anyone find a solution to this?

I installed the same plugin and did all the same things and I get a message from apple whenever I submit my .ipa built with ionic package.

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.


Finally did anyone find the solution?

If you are running your app in iphone using “ionic run ios” then this will also cause the same problem.
SOLUTION:- instead you must run your ios app using XCODE to install app into iphone.

I am using “pushwoosh-cordova-plugin” v6.5.0 and get this error when attempting to register my device with the provider plugin:

Error Domain=NSCocoaErrorDomain Code=3000 "no valid “aps-environment” entitlement string found for application" UserInfo={NSLocalizedDescription=no valid “aps-environment” entitlement string found for application}

I haven’t seen any solution yet such as setting push notification entitlements with config.xml somehow so I put in an Ionic Pro support ticket.

Cordova iOS 4.5.4

… it has happened to me that ionic run stops working when my physical device is plugged in to the mac, even though I’m specifying to run on the XS Simulator…

… if you look closely in the logs, when an iPhone is plugged in, the build process seems to try and deploy in the device instead of in the sim… unplugged the iPhone and ionic run works fine in the simulator…