Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting provisioning profile on Apple Watch Target #2578

Closed
Aximem opened this issue Sep 19, 2024 · 3 comments
Closed

Setting provisioning profile on Apple Watch Target #2578

Aximem opened this issue Sep 19, 2024 · 3 comments

Comments

@Aximem
Copy link

Aximem commented Sep 19, 2024

Build/Submit details page URL

https://expo.dev/accounts/gowod/projects/gowod-app/builds/286a07f9-99b7-4290-9153-6bba87063a64

Summary

We have an error when trying to build our iOS App because of Apple Watch Target which has no provisioning profile.

error: No profiles for 'xx.watchkitapp' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'xx.watchkitapp'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'XXWatch' from project 'XX')

There is a similar issue (#795) but it doesn't provide a solution. For now we are building manually the archive but could you provide a documentation / explanation on how to perform to manually set the provisioning profile on another target.

Should we use a config plugin ?

Managed or bare?

Bare

Environment

expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.5
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 21.7.1 - /usr/local/bin/node
      Yarn: 1.22.10 - /usr/local/bin/yarn
      npm: 10.5.0 - /usr/local/bin/npm
      Watchman: 2024.03.18.00 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.15.2 - /Users/maxime/.rbenv/shims/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.4, iOS 17.4, macOS 14.4, tvOS 17.4, visionOS 1.1, watchOS 10.4
    IDEs:
      Android Studio: 2022.3 AI-223.8836.35.2231.10671973
      Xcode: 15.3/15E204a - /usr/bin/xcodebuild
    npmPackages:
      expo: 51 => 51.0.14 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.74.1 => 0.74.1 
      react-native-web: ~0.19.6 => 0.19.12 
    npmGlobalPackages:
      eas-cli: 9.0.3
    Expo Workflow: bare

Error output

No response

Reproducible demo or steps to reproduce from a blank project

Add a target for Apple Watch and try to generate an iOS build on EAS

@Aximem Aximem added the needs review Issue is ready to be reviewed by a maintainer label Sep 19, 2024
@szdziedzic
Copy link
Member

Hi,

Are you using credentials managed by EAS? If so can you try to run npx expo prebuild and try to build the prebuild version and see if there are any differences?

@szdziedzic szdziedzic added eas build and removed needs review Issue is ready to be reviewed by a maintainer labels Sep 23, 2024
@Aximem
Copy link
Author

Aximem commented Sep 23, 2024

Hi @szdziedzic Yes we are using credentials managed by EAS.
When running prebuild we have the "automatically manage signing" activated on the watch target (contrary to XCode error shown) and we are able to build everything manually thanks to XCode Managed Profile.

This issue if more a question than an issue on how can we use credentials managed by EAS on a target that is not the main one ?
Do we need to write a config plugin that manually set a provisioning profile for this target only and then use EAS Configuration/Credentials ? I couldn't find documentation about this use case.

@Aximem
Copy link
Author

Aximem commented Oct 14, 2024

We couldn't find a way to handle this case with credentials managed by EAS. Even after setting credentials on EAS platform and set manual signin on watch target, we got some strange issues, like entitlements file not readable anymore etc.

We made it by managing credentials ourself, with credentials.json:

{
  "ios": {
    "AppName": {
      "distributionCertificate": {
        "path": "credentials/ios/dist-cert.p12",
        "password": "XX"
      },
      "provisioningProfilePath": "credentials/ios/AppName.mobileprovision"
    },
    "AppNameWatch": {
      "distributionCertificate": {
        "path": "credentials/ios/dist-cert.p12",
        "password": "XX"
      },
      "provisioningProfilePath": "credentials/ios/AppNameWatch.mobileprovision"
    }
  }
}

And eas.json

"production": {
      "ios": {
        "credentialsSource": "local"
      },
      "android": {}
}

@Aximem Aximem closed this as completed Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants