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

Out of sync entitlements for HealthKit (possibly others as well) #2117

Closed
fobos531 opened this issue Nov 9, 2023 · 6 comments
Closed

Out of sync entitlements for HealthKit (possibly others as well) #2117

fobos531 opened this issue Nov 9, 2023 · 6 comments
Labels
eas build needs review Issue is ready to be reviewed by a maintainer

Comments

@fobos531
Copy link
Contributor

fobos531 commented Nov 9, 2023

Build/Submit details page URL

https://expo.dev/accounts/uxapp/projects/uxwellara/builds/10e38241-ab74-4cbe-ad61-1c5e63914071

Summary

It seems like HealthKit capabilities are not properly synced at EAS build. I added necessary entitlements to my app, specifically:

com.apple.developer.healthkit
com.apple.developer.healthkit.access
com.apple.developer.healthkit.background-delivery

Upon scheduling an EAS build, I can confirm that the capabilities are properly synced on the Apple Developer portal and the provisioning profile is updated to have this new capabilities enabled. However, when the actual app is being built inside EAS build, its almost like EAS is using some "outdated" version of the provisioning profile which doesn't have these capabilities enabled, thereby throwing the following error:

/Users/expo/workingdir/build/mobile/ios/WellaraDev.xcodeproj: error: Provisioning profile "*[expo] com.uxdotapp.wellara.dev AdHoc 1699365499889" doesn't support the HealthKit capability. (in target 'WellaraDev' from project 'WellaraDev')
/Users/expo/workingdir/build/mobile/ios/WellaraDev.xcodeproj: error: Provisioning profile "*[expo] com.uxdotapp.wellara.dev AdHoc 1699365499889" doesn't include the com.apple.developer.healthkit,
com.apple.developer.healthkit.access,
and com.apple.developer.healthkit.background-delivery entitlements. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update. 

Once again, on the developer portal these capabilities are indeed enabled.

Managed or bare?

Managed

Environment

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 14.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node
      Yarn: 1.22.19 - /opt/homebrew/bin/yarn
      npm: 9.3.1 - ~/.nvm/versions/node/v18.14.0/bin/npm
      Watchman: 2023.10.09.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.12.1 - /opt/homebrew/lib/ruby/gems/3.2.0/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
    IDEs:
      Android Studio: 2022.3 AI-223.8836.35.2231.11005911
      Xcode: 15.0/15A240d - /usr/bin/xcodebuild
    npmPackages:
      expo: ^49.0.16 => 49.0.16 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.72.6 => 0.72.6 
    npmGlobalPackages:
      eas-cli: 5.7.0
    Expo Workflow: managed

Error output

No response

Reproducible demo or steps to reproduce from a blank project

  1. Initialize a sample project
  2. Add HealthKit capabilities to the app using either https://github.com/kingstinct/react-native-healthkit or https://github.com/agencyenterprise/react-native-health
  3. Build the app in EAS build
@fobos531 fobos531 added the needs review Issue is ready to be reviewed by a maintainer label Nov 9, 2023
@burrrrrr
Copy link

burrrrrr commented Nov 10, 2023

I am experiencing a similar issue but for NFC capability instead. Capability is enabled in dev portal and entitlements have been set up properly.

@sascha93
Copy link

sascha93 commented Nov 10, 2023

Same here, also with NFC capability. But works with Expo Version 47. Works also with Expo 49.0.15 if you add the React Native code before first build in expo. Tested with react-native-nfc-manager & Expo dev build.

This was the error I got:
/Users/expo/workingdir/build/ios/xx.xcodeproj: error: Provisioning profile "*[expo] com.xxx.xx AdHoc xxxxx" doesn't support the Near Field Communication Tag Reading capability. (in target 'xx' from project 'xx')

/Users/expo/workingdir/build/ios/xx.xcodeproj: error: Provisioning profile "*[expo] com.xx.xx AdHoc xxxxx" doesn't include the com.apple.developer.nfc.readersession.formats entitlement. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update. (in target 'xxx' from project 'xx')

@fobos531 fobos531 changed the title Out of sync entitlements for HealthKit Out of sync entitlements for HealthKit (possibly others as well) Nov 10, 2023
@szdziedzic
Copy link
Member

Hi,

What is the updated date of your provisioning profile if you run the eas credentials command for this profile? Is it some old date?

@szdziedzic
Copy link
Member

Can you check if 5.9.1 fixes it for you?

@fobos531
Copy link
Contributor Author

fobos531 commented Nov 24, 2023

Can you check if 5.9.1 fixes it for you?

Hey Szymon,

from my preliminary testing, it does indeed seem to resolve the issue. Thanks!

I'll keep this open for a little in case others want to chime in with their experience. @sascha93 @burrrrrr

@fobos531 fobos531 closed this as completed Dec 3, 2023
@Rudh-Conka
Copy link

Had a similar issue, upgrading to eas 5.9.1 fixed it - now my development build is building and apple health works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eas build needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

5 participants