johnsonsu/react-native-sound-player

[ERROR] Build failed with ios

Closed this issue · 1 comments

Hi everyone Hope you're doing great.
My problem is that everything works well with android, but when trying to build for IOS, I get a build failed error related to "Link RNSoundPlayer". I have tried to add the RNSoundPlayer dependency to build phases but still the same error.

Steps to reproduce the behavior:

  1. npm i react-native-sound-player
  2. pod install
  3. build ios using either xcode or react-native run-ios
  • OS: IOS
  • React Native 0.68.1
  • react-native-sound-player ^0.13.2

I don't know if this can be related but I have disabled flipper in podfile in order to successfully compile RNFirebase

Error that I'm getting:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_RCTEventEmitter", referenced from: _OBJC_CLASS_$_RNSoundPlayer in RNSoundPlayer.o "_OBJC_METACLASS_$_RCTEventEmitter", referenced from: _OBJC_METACLASS_$_RNSoundPlayer in RNSoundPlayer.o "_RCTRegisterModule", referenced from: +[RNSoundPlayer load] in RNSoundPlayer.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thank you

The problem is resolved by:

  1. cleaning the project
  2. pod install
  3. Link binary to library