When I use AppFlow to build an iOS App Store version of my app and it’s uploaded to Apple Connect, I get an email response telling me:
Your delivery was successful, but you may wish to correct the following issues in your next delivery:
ITMS-90078: 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.
I am using Ionic 7, Capacitor 5.3 and for push notifications, I’m using:
I do not have access to xCode so I’d like to use AppFlow to build my ipa.
How can I enable Push Notification entitlements in AppFlow using Capacitor without using xCode?
This is tricky without a mac.
You have to add a
App.entitlements file to your Xcode project, but it’s not as simple as copying a file, you have to actually add it to the project, so you can use a nodejs script that uses node-xcode or a similar library to do so, or probably https://trapeze.dev/
The file content should look like
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
Then from https://developer.apple.com/ you have to add push notification capabilities to the app identifier and generate a new provisioning profile and make sure it shows the push notifications in the capabilities section.
I Julio, thanks for you quick reply.
I am allergic to Apple products so modifying anything in xcode is like doing my taxes. (yes, I break into hives) so I was hoping that AppFlow could keep me away from insanity. For the moment, I’ll just go back to the old method of starting a virtual mac on macincloud and following the config instructions on OneSignal. It will take less time than researching node-xcode scripts.
Do you think it would be a possible feature request to have AppFlow configure this for us when we run a build? Push Notifications are such an important feature that I think it would be a popular addition. Or perhaps have someone create a tutorial on how to specifically add the App.entitlements to our projects?
As Julio mentioned, developing without a Mac is tricky but doable. Fortunately, many iOS or Android configurations to native projects only have to be performed once, so to expand on his suggestions:
- The easiest way: Use MacinCloud, make the changes, and you’re done.
- Use Trapeze with Appflow. Check out the Entitlements section and the Appflow CI/CD one.
Just giving my vote for MacInCloud That is what I use as I refuse to buy a Mac just to build our iOS app and perform the very little specific iOS development we need to do.
Have you ever tried setting up a VMware machine with MacOS and xcode? I tried it a while back but it was very clunky. Don’t know if it’s better today.
Last time I checked, you can no longer get a legit current Mac OS license.