react-native-health icon indicating copy to clipboard operation
react-native-health copied to clipboard

Undefined symbols when building

Open bvelasquez opened this issue 1 year ago • 3 comments

If anyone can help me with this, I would appreciate it. I'm getting these build errors after a pod install.

Describe the bug Undefined symbols for architecture arm64: "OBJC_CLASS$_RCTCallableJSModules", referenced from: objc-class-ref in RCTAppleHealthKit.o "OBJC_CLASS$_RCTEventEmitter", referenced from: OBJC_CLASS$_RCTAppleHealthKit in RCTAppleHealthKit.o "OBJC_METACLASS$_RCTEventEmitter", referenced from: OBJC_METACLASS$_RCTAppleHealthKit in RCTAppleHealthKit.o "_RCTJSErrorFromNSError", referenced from: ___65-[RCTAppleHealthKit(Methods_Body) body_getLatestWeight:callback:]_block_invoke in RCTAppleHealthKit+Methods_Body.o ___66-[RCTAppleHealthKit(Methods_Body) body_getWeightSamples:callback:]_block_invoke in RCTAppleHealthKit+Methods_Body.o ___60-[RCTAppleHealthKit(Methods_Body) body_saveWeight:callback:]_block_invoke in RCTAppleHealthKit+Methods_Body.o ___72-[RCTAppleHealthKit(Methods_Body) body_getLatestBodyMassIndex:callback:]_block_invoke in RCTAppleHealthKit+Methods_Body.o ___73-[RCTAppleHealthKit(Methods_Body) body_getBodyMassIndexSamples:callback:]_block_invoke in RCTAppleHealthKit+Methods_Body.o ___67-[RCTAppleHealthKit(Methods_Body) body_saveBodyMassIndex:callback:]_block_invoke in RCTAppleHealthKit+Methods_Body.o ___66-[RCTAppleHealthKit(Methods_Body) body_getHeightSamples:callback:]_block_invoke in RCTAppleHealthKit+Methods_Body.o ... "_RCTMakeError", referenced from: -[RCTAppleHealthKit initializeHealthKit:callback:] in RCTAppleHealthKit.o ___50-[RCTAppleHealthKit initializeHealthKit:callback:]_block_invoke in RCTAppleHealthKit.o -[RCTAppleHealthKit getAuthorizationStatus:callback:] in RCTAppleHealthKit.o -[RCTAppleHealthKit(Methods_Activity) activity_getActiveEnergyBurned:callback:] in RCTAppleHealthKit+Methods_Activity.o ___79-[RCTAppleHealthKit(Methods_Activity) activity_getActiveEnergyBurned:callback:]_block_invoke in RCTAppleHealthKit+Methods_Activity.o -[RCTAppleHealthKit(Methods_Activity) activity_getBasalEnergyBurned:callback:] in RCTAppleHealthKit+Methods_Activity.o ___78-[RCTAppleHealthKit(Methods_Activity) activity_getBasalEnergyBurned:callback:]_block_invoke in RCTAppleHealthKit+Methods_Activity.o ... "_RCTRegisterModule", referenced from: +[RCTAppleHealthKit load] in RCTAppleHealthKit.o "__RCTLogNativeInternal", referenced from: -[RCTAppleHealthKit(Methods_Fitness) fitness_setObserver:] in RCTAppleHealthKit+Methods_Fitness.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

To Reproduce Just trying to build after a pod install.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

bvelasquez avatar Jun 11 '23 19:06 bvelasquez

Hey @bvelasquez do you still need help with this?

GGGava avatar Aug 29 '23 19:08 GGGava

Hello @GGGava . I didn't see that you responded. Yes, I do still need help. I get these errors when trying to compile for Simulator and in XCode only. Building with fastlane works though, which is strange.

bvelasquez avatar Oct 31 '23 17:10 bvelasquez

Has anyone run into this problem? I'm still getting this error when trying to build. Strangely, only when building in XCode.

bvelasquez avatar Dec 11 '23 16:12 bvelasquez