App Clips break Xcode Archive & Export for iOS

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 and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings 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

Hi! Any update here? We’re running into a similar issue.

Hi! Thanks for including the build log.

Can you enable support access on your app so we can take a closer look? Instructions for doing this are here: https://devcenter.bitrise.io/troubleshooting/enabling-bitrise-support-user/

Enabled! You’ll see the failed builds but 1bfc61d79a888e12 or cd898009dcbecebe are examples.

HI! While waiting on your response I did some additional research. It turns out this is a known issue and our engineers are working to fix it. I don’t currently have an ETA, but it’s actively being worked on.

One potential workaround might be to provide a custom export options plist as inputting for the step. Using this method we can specify if we want to export the App Clip or the App itself. Here’s an example:

<?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">
<plist version="1.0">
	<dict>
		<key>distributionBundleIdentifier</key>
		<string>io.bitrise.appcliptest.Clip</string>
		<key>method</key>
		<string>ad-hoc</string>
		<key>provisioningProfiles</key>
		<dict>
			<key>io.bitrise.appcliptest.Clip</key>
			<string>Bitrise iOS ad-hoc - (io.bitrise.appcliptest.Clip)</string>
			<key>io.bitrise.appcliptest.ios-widgets</key>
			<string>Bitrise iOS ad-hoc - (io.bitrise.appcliptest.ios-widgets)</string>
		</dict>
		<key>signingCertificate</key>
		<string>Apple Distribution: BITFALL FEJLESZTO KORLATOLT FELELOSSEGU TARSASAG (72SA8V3WYL)</string>
		<key>teamID</key>
		<string>72SA8V3WYL</string>
	</dict>
</plist>
1 Like

Thanks for the help Matthew! We’ll wait for a fix but appreciate the status update and hope it can be resolved soon.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Howdy! The dev’s are telling me this should be resolved now.

Matthew
Senior Customer Engineer