# IOS Missing Push Notification Entitlement

**URL:** <https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222>\
**Category:** ionic-v3\
**Created:** [January 14, 2018, 11:13pm UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222 "2018-01-14T23:13:58Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![pe1](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pe1/32/100938_2.png) [@pe1](https://forum.ionicframework.com/u/pe1)\
**Post date:** [January 14, 2018, 11:13pm UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/1 "2018-01-14T23:13:58Z")

</div>

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](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1).

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”

```auto
 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 

```

---

<div class="post-metadata">

**Author:** ![AaronSterling](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@AaronSterling](https://forum.ionicframework.com/u/AaronSterling)\
**Post date:** [January 14, 2018, 11:18pm UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/2 "2018-01-14T23:18:59Z")

</div>

Unrelated. but I suggest you update your Node to the LTS. Your current version has multiple known security holes.

---

<div class="post-metadata">

**Author:** ![pe1](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pe1/32/100938_2.png) [@pe1](https://forum.ionicframework.com/u/pe1)\
**Post date:** [January 14, 2018, 11:24pm UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/3 "2018-01-14T23:24:49Z")

</div>

Yeah, i am going to update soon, the latest LTS is 8.9.4 so my 6.10.0 must be a bit ancient, Thanks!

---

<div class="post-metadata">

**Author:** ![pe1](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pe1/32/100938_2.png) [@pe1](https://forum.ionicframework.com/u/pe1)\
**Post date:** [January 16, 2018, 4:24pm UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/4 "2018-01-16T16:24:06Z")

</div>

I have regenerated provisioning profiles and still get that warning. It’s strange because profile does include '“aps-environment” entitlement:

![aps-environment](https://global.discourse-cdn.com/ionicframework/original/3X/f/e/fefa4b034a0fce12ce3cb2b21308c6a552d81b92.png)

---

<div class="post-metadata">

**Author:** ![michael\_reiser](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@michael\_reiser](https://forum.ionicframework.com/u/michael_reiser)\
**Post date:** [January 16, 2018, 8:18pm UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/5 "2018-01-16T20:18:28Z")

</div>

Maybe a dumb question, but did you go into XCode capabilities tab and enable the Notifications toggle switch?

---

<div class="post-metadata">

**Author:** ![pe1](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pe1/32/100938_2.png) [@pe1](https://forum.ionicframework.com/u/pe1)\
**Post date:** [January 16, 2018, 8:40pm UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/6 "2018-01-16T20:40:36Z")

</div>

yep, i had enabled that

![45](https://global.discourse-cdn.com/ionicframework/original/3X/0/b/0b4fd46cc15382ed36fa4fafebcfbc37e5b2c4bc.jpg)

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [January 16, 2018, 9:46pm UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/7 "2018-01-16T21:46:12Z")

</div>

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:

[https://github.com/phonegap/phonegap-plugin-push/issues/1408](https://github.com/phonegap/phonegap-plugin-push/issues/1408) (specially the last comment about a hook)

and on stackoverflow [https://stackoverflow.com/questions/14807129/missing-push-notification-entitlement](https://stackoverflow.com/questions/14807129/missing-push-notification-entitlement)

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.

---

<div class="post-metadata">

**Author:** ![pe1](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pe1/32/100938_2.png) [@pe1](https://forum.ionicframework.com/u/pe1)\
**Post date:** [January 16, 2018, 10:17pm UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/8 "2018-01-16T22:17:04Z")

</div>

> [@reedrichards](#):
>
> 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

---

<div class="post-metadata">

**Author:** ![pe1](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pe1/32/100938_2.png) [@pe1](https://forum.ionicframework.com/u/pe1)\
**Post date:** [January 16, 2018, 11:12pm UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/9 "2018-01-16T23:12:21Z")

</div>

When i validate the archive before export, i can’t see `aps-environment` on Entitlements list, but probably should be. The question is how to do it?

![aps-environment](https://global.discourse-cdn.com/ionicframework/original/3X/9/1/91c4d3dee73c1b6ec0fdec2f53ba061d088cb1f5.jpg)

---

<div class="post-metadata">

**Author:** ![pe1](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pe1/32/100938_2.png) [@pe1](https://forum.ionicframework.com/u/pe1)\
**Post date:** [January 17, 2018, 12:55am UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/10 "2018-01-17T00:55:00Z")

</div>

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](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’.

Will see tomorrow if push notify issue is fixed

---

<div class="post-metadata">

**Author:** ![jaydz](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@jaydz](https://forum.ionicframework.com/u/jaydz)\
**Post date:** [January 17, 2018, 3:17am UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/11 "2018-01-17T03:17:32Z")

</div>

Thanks for sharing. Apple’s rabbit holes are deadly. Any useful info is a public service.

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [January 17, 2018, 6:43am UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/12 "2018-01-17T06:43:51Z")

</div>

> [@pe1](#):
>
> Finally i got rid of that apple warning (after 2 days digging in xcode).

Congrats!!! And thx for documenting your solution

---

<div class="post-metadata">

**Author:** ![jperez1111](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@jperez1111](https://forum.ionicframework.com/u/jperez1111)\
**Post date:** [April 12, 2019, 7:05pm UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/13 "2019-04-12T19:05:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:54pm UTC](https://forum.ionicframework.com/t/ios-missing-push-notification-entitlement/118222/14 "2021-07-19T21:54:51Z")

</div>

Closed on July 19, 2021, 9:54pm UTC


