kingstinct / react-native-healthkit

HealthKit bindings for React Native with TypeScript
https://kingstinct.com/react-native-healthkit/
MIT License
236 stars 47 forks source link

Error while EAS build with v8.0.0 - type 'HKUnit' has no member 'appleEffortScore' #96

Closed JoelNgiamKeeYong closed 4 months ago

JoelNgiamKeeYong commented 4 months ago

Tried creating a development build with EAS Build with v8.0.0 but resulted in the following issue / error in fastlane.

I downgraded to v7.3.2 (the preceding version before v8.0.0) and could build the project, but the issue still requires attention for future updates. FYI - I followed all the steps in the READ.ME file, including adding the expo plugins and configurations.

Thanks in advance!!

ERROR IN FASTLANE DURING EAS BUILD

❌ (node_modules/@kingstinct/react-native-healthkit/ios/Serializers.swift:117:47)

115 | 116 | if #available(iOS 18.0, *) { 117 | if quantity.is(compatibleWith: HKUnit.appleEffortScore()) { | ^ type 'HKUnit' has no member 'appleEffortScore' 118 | return serializeQuantity(unit: HKUnit.appleEffortScore(), quantity: quantity) 119 | } 120 | }

❌ (node_modules/@kingstinct/react-native-healthkit/ios/Serializers.swift:118:51)

116 | if #available(iOS 18.0, *) { 117 | if quantity.is(compatibleWith: HKUnit.appleEffortScore()) { 118 | return serializeQuantity(unit: HKUnit.appleEffortScore(), quantity: quantity) | ^ type 'HKUnit' has no member 'appleEffortScore' 119 | } 120 | } 121 | ⚠️ Script has ambiguous dependencies causing it to run on every build. To fix, go to: Xcode » JIMDev/JIMDev » Build Phases » '[CP-User] [RNGoogleMobileAds] Configuration' Either: Uncheck "Based on dependency analysis", or select output files to trigger the script Run ▸ ARCHIVE FAILED ▸ The following build commands failed: ▸ SwiftCompile normal arm64 /Users/expo/workingdir/build/node_modules/@kingstinct/react-native-healthkit/ios/Serializers.swift (in target 'kingstinct-react-native-healthkit' from project 'Pods') ▸ SwiftCompile normal arm64 Compiling\ Serializers.swift /Users/expo/workingdir/build/node_modules/@kingstinct/react-native-healthkit/ios/Serializers.swift (in target 'kingstinct-react-native-healthkit' from project 'Pods') ▸ (2 failures) `

EAS JSON

{ "cli": { "version": ">= 0.41.0", "appVersionSource": "remote" // https://docs.expo.dev/build-reference/app-versions/ }, "build": { "development": { "developmentClient": true, "distribution": "internal", "ios": { "image": "latest" }, "env": { "APP_VARIANT": "development" } }, "preview": { "channel": "preview", "distribution": "internal", "ios": { "image": "latest" } }, "production": { "autoIncrement": true, "channel": "production", "ios": { "image": "latest" } } }, "submit": { "production": { "android": {}, "ios": { "appleId": "[REDACTED]", "ascAppId": "[REDACTED]", "appleTeamId": "[REDACTED]" } } } }

robertherber commented 4 months ago

Thanks for a thorough report @JoelNgiamKeeYong! I just released version 8.0.1 which I've locally verified builds with XCode 15 - could you try again and let me know how it goes? :)

JoelNgiamKeeYong commented 4 months ago

Thanks for a thorough report @JoelNgiamKeeYong! I just released version 8.0.1 which I've locally verified builds with XCode 15 - could you try again and let me know how it goes? :)

Yup it works now, thanks for the quick response!!