Missing `parentBundleId` for app clip target causes failure when updating credentials
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 236
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 98
Description
### Build/Submit details page URL
_No response_
### Summary
I'm getting an error when running `eas credentials` on a prebuilt iOS project which includes an App Clip target. Updating the provisioning profile for the App Clip target fails with the following error:
```
✖ Failed to sync capability identifiers com.my-app.appclip
UnexpectedAppleResponse: Relationship is required but was not provided. - The relationship 'parentBundleId' is required but was not provided with this request.
Relationship is required but was not provided. - The relationship 'parentBundleId' is required but was not provided with this request.
```
I have several extension targets in our iOS project (added using @EvanBacon 's `expo-apple-targets` plugin):
- a notification service extension,
- a notification content extension,
- an app clip
If I prebuild the Xcode project with only the notification service and content extensions, `eas credentials` completes without issues.
I get the above error only if the project includes the app clip target.
It seems that the App Store Connect API is returning an error response because a `parentBundleId` is not specified when executing `BundleId.updateBundleIdCapabilityAsync()` for the app clip bundle identifier. Since `@expo/apple-utils` is a private repo, I can't really see what's going on there.
The `com.apple.developer.parent-application-identifiers` key in my app clip's entitlements is also set to `$(AppIdentifierPrefix)com.my-app`.
Any help would be much appreciated.
### Managed or bare?
Bare
### Environment
```
expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.5.2
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.16.0 - ~/.n/bin/node
Yarn: 1.22.19 - ~/code/my_app/node_modules/.bin/yarn
npm: 9.5.1 - ~/.n/bin/npm
Watchman: 2023.04.10.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/me/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9514443
Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
npmPackages:
expo: ^49.0.7 => 49.0.7
react: 18.2.0 => 18.2.0
react-native: 0.72.3 => 0.72.3
npmGlobalPackages:
eas-cli: 5.2.0
expo-cli: 6.3.2
Expo Workflow: bare
```
Expo Doctor:
```
✔ Validating global prerequisites versions
✔ Checking for incompatible packages
✔ Verifying prebuild support package versions are compatible
✔ Checking dependency versions for compatibility with the installed Expo SDK
✔ Validating Expo Config
Didn't find any issues with the project!
```
### Error output
```
✖ Failed to sync capability identifiers com.my-app.appclip
UnexpectedAppleResponse: Relationship is required but was not provided. - The relationship 'parentBundleId' is required but was not provided with this request.
Relationship is required but was not provided. - The relationship 'parentBundleId' is required but was not provided with this request.
UnexpectedAppleResponse: Relationship is required but was not provided. - The relationship 'parentBundleId' is required but was not provided with this request.
at o.parseResponse (/Users/me/.n/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:742952)
at o.requestAndParseAsync (/Users/me/.n/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:741637)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async o.fetchSingleModelAsync (/Users/me/.n/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:741360)
at async o.patchModelAsync (/Users/me/.n/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:741466)
at async l.updateBundleIdCapabilityAsync (/Users/me/.n/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:802110)
at async syncCapabilityIdentifiersForEntitlementsAsync (/Users/me/.n/lib/node_modules/eas-cli/build/credentials/ios/appstore/capabilityIdentifiers.js:104:9)
at async syncCapabilityIdentifiersAsync (/Users/me/.n/lib/node_modules/eas-cli/build/credentials/ios/appstore/ensureAppExists.js:91:37)
at async syncCapabilitiesAsync (/Users/me/.n/lib/node_modules/eas-cli/build/credentials/ios/appstore/ensureAppExists.js:80:5)
at async ensureBundleIdExistsWithNameAsync (/Users/me/.n/lib/node_modules/eas-cli/build/credentials/ios/appstore/ensureAppExists.js:58:9)
```
### Reproducible demo or steps to reproduce from a blank project
-
Contributor guide
Assessment
This issue has not been assessed yet.