Why won't xcodebuild use my provisioning profiles?

717 Views Asked by At

I have a GitHub Action that builds my app and uploads it to TestFlight automatically. Ever since I added a Notification Service extension, I've been having issues with building the app. I have been using Fastlane, but I boiled the issue down to the following command: xcodebuild archive -scheme Yeshivat\ Torat\ Shraga -project ./Yeshivat\ Torat\ Shraga.xcodeproj

This command works fine on my laptop, but when run in a Github Actions CI machine, it produces the following error:

error: "NotificationModifier" requires a provisioning profile with the App Groups feature. Select a provisioning profile in the Signing & Capabilities editor. (in target 'NotificationModifier' from project 'Yeshivat Torat Shraga')
error: "Yeshivat Torat Shraga" requires a provisioning profile with the Associated Domains, App Groups, App Attest, and Push Notifications features. Select a provisioning profile in the Signing & Capabilities editor. (in target 'Yeshivat Torat Shraga' from project 'Yeshivat Torat Shraga')

When using gym, I am specifying the correct certificates, yet I am getting the above error (also, only on the CI machine).

My questions

  • Why does this work on my laptop, but not on the CI machine?
    • How can I set up my local environment to match the CI machine to easier debug this?
  • How can I automate this process successfully (either directly with xcodebuild, or preferably with Fastlane)?

I have been struggling with this issue for the last 8 days, any help is absolutely welcome!

0

There are 0 best solutions below