Bitrise Build Issue Report template
Description of the issue
There seems to be a problem with the export phase of the Xcode Archive & Export for iOS step, specifically when it comes to Xcode 12 + App Clips and code signing. It is complaining that the entitlements in the provisioning profile do not match those required for the target:
[06:55:21] set -o pipefail && xcodebuild "-exportArchive" "-archivePath" "/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/__archive__913569282/App.xcarchive" "-exportPath" "/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/__export__982072697" "-exportOptionsPlist" "/Users/vagrant/deploy/export_options.plist" | xcpretty
❌ error: exportArchive: "Clip.app" requires a provisioning profile with the App Groups, Associated Domains, and On Demand Install Capable features.
❌ Error Domain=IDEProvisioningErrorDomain Code=9 ""Clip.app" requires a provisioning profile with the App Groups, Associated Domains, and On Demand Install Capable features." UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription="Clip.app" requires a provisioning profile with the App Groups, Associated Domains, and On Demand Install Capable features., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}
Very curious, though, in the auto provision step the log does show Bitrise creating a profile with the correct entitlements (and looking in App Store Connect does show a proper profile using the right cert is there for the App Clip).
Upon further digging of the build log, it looks like the root issue is that the App Clip binary is not detected by this step as one that has to be code signed. Just above this final error, Bitrise is filtering the list of installed provisions to match the targets as needed, and the App Clip is not listed:
Target Bundle ID - Entitlements map
com.xxx.yyy: [com.apple.developer.in-app-payments com.apple.security.application-groups com.apple.developer.applesignin com.apple.developer.ubiquity-kvstore-identifier com.apple.security.app-sandbox com.apple.security.device.camera com.apple.security.files.user-selected.read-only com.apple.security.personal-information.photos-library com.apple.developer.associated-domains com.apple.developer.healthkit com.apple.developer.icloud-container-identifiers com.apple.security.personal-information.location aps-environment com.apple.developer.siri com.apple.security.network.client]
com.xxx.yyy.auth: []
com.xxx.yyy.widget: [com.apple.security.application-groups]
com.xxx.yyy.watchkitapp.extension.siri: [com.apple.security.application-groups]
com.xxx.yyy.siri: [com.apple.security.application-groups]
com.xxx.yyy.homewidget: [com.apple.security.app-sandbox com.apple.security.application-groups com.apple.security.network.client]
com.xxx.yyy.watchkitapp: []
com.xxx.yyy.extension: [com.apple.developer.healthkit com.apple.developer.icloud-container-identifiers com.apple.developer.ubiquity-kvstore-identifier com.apple.security.application-groups]
com.xxx.yyy.stickers: []
Resolving CodeSignGroups...
While this step is filtering, it does clearly list the Bitrise-generated provisioning file that has been installed from App Store Connect for this binary:
Resolving CodeSignGroups...
Installed certificates:
Serial: xxx, Name: Apple Distribution: xxx (xxx), Team: xxx (xxx), Expiry: 2021-08-28 01:27:59 +0000 UTC
Serial: xxx, Name: Apple Distribution: xxx (xxx), Team: xxx (xxx), Expiry: 2021-08-28 01:27:59 +0000 UTC
Installed profiles:
{
"bundle_id": "com.xxx.yyy.appclip",
"certificates": [
{
"name": "Apple Distribution: xxx (xxx)",
"serial": "xxx",
"team_id": "xxx"
}
],
"expire": "2021-08-28 01:27:59 +0000 UTC",
"export_type": "app-store",
"is_xcode_managed": false,
"name": "Bitrise ios app-store - (com.xxx.yyy.appclip) (xxx)",
"team": "xxx (xxx)"
}
My guess is that perhaps the step is looking at the outputted file path, and since the App Clips are not delivered in the normal Plugins
directory inside the bundle but rather a new AppClips
directory?
Unfortunately this breaks all builds that try to include an App Clip being uploaded to Test Flight or the App Store.
Environment:
On Bitrise.io servers using the latest Xcode 12 beta 6 stack.
Which build Step causes the issue and which version of the step?
Xcode Archive & Export for iOS
Reproducibility
- Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
-
Does a rebuild without caches help? (You can remove the
Cache:Pull
andCache:Push
steps temporarily to not to use the cache, or you can delete all the caches on theSettings
tab of the app. : NO - Does the issue happen sporadically, or every time? : Every time
- Does upgrading the build Step to the latest version help? : NO
- When did the issue start? : As soon as I tried to add an App Clip
Build log
Please copy paste the build’s bitrise.io URL here (or if the issue happens somewhere else then the full logs), or if you can’t share the url / log here then send the url or full log through a private channel (e.g. email - https://www.bitrise.io/contact ), with a link to the related Discuss issue. https://app.bitrise.io/build/4fbdee7dc139603e#?tab=log