Missing Push Entitlement


#1

For some reason, when we’re building our app is missing the push entitlement in XCODE.

We’re using the OneSignal Ionic Native plugin.

Push notifications have been enabled in the Apple Developer account and we’ve downloaded new provisioning profiles to match, but for some reason they just dont appear.

I know that we can manually turn them on, but we’re also using Ionic Package to do our build so manual is not really an option.

Can anyone help please? It’d be really appreciated.


#2

Hey!

I had the same problem with this for a while, which was annoying the heck out of me. To be honest I can not exactly say what I did to fix it in the end, but what I did was to prepare and build the ios project via ionic cordova build ios, then opened up the project with XCode, went to the Capabilities, checked the Background Notification one and the Push Notifications. I also turned off the automatic certificate stuff and just provided XCode with the needed ones myself. (Dist Cert, Push Cert, Distribution Provisioning Profile)

Another thing I did was to manually fiddle with the Debug-Entitlements.plist and Release-Entitlements.plist, I simply put the aps-environment to production in both.

Eventually I also reuploaded the certificates onto Ionic Package and then did the ionic package command. Somehow it worked then. I wish you good luck with that, fiddling around a bit with the config stuff manually might solve it somehow.


#3

hey @duke1102 yeah i came to the same conclusion today, it looks like when codesigning the app, that ionic package adds the entitlements from the provisioning profile. I just wish that XCode did the same (have to have a backup plan in place for if Ionic Package wasn’t available)


#4

Hehe, yea. Really weird, gave me some headache for sure.
In terms of a backup plan… can’t you build your iOS App on a local Mac machine? Any somewhat decent and recent Mac(book) should be able to accomplish that. (I have an old MacBook Air from like 2009 or so at work, sadly I can’t upgrade to OS X Sierra with it, since it is unsupported, thus I can’t upgrade XCode to 8.3, which makes me being stuck at 8, failing the possibility to run the App for testing on my boss’ iPhone.)

Another idea would be to rent a Mac in the Cloud, there are several companies offering those. They are a bit costly per month though, at least from what I have seen. Think one out there did offer “pay-as-you-use” though, which is nice.


#5

Yeah totally the right direction for the backup plan, we’ve got a couple of hundred Macs knocking around.

It’s just spending time to document all the steps, and making sure they’re followed, right now there’s only a few steps, going forward we’re gonna have a lot more, trying to automate as much as possible.


#6

Hehe, I feel you on that. Probably wise to spend some time to write some scripts for automated building, this way (mostly) nothing can go wrong. Would assume the Ionic Package Cloud service is nothing different than a bunch of build scripts being executed and all.