blackuy/react-native-twilio-video-webrtc

[IOS] Undefined symbols for architecture x86_64:

Closed this issue · 2 comments

Steps to reproduce

  1. Attempt to run application in iOS simulator.
  2. Build fails .

Expected behaviour

Expected build to be successful.

Actual behaviour

I'm getting this error while running the iOS app

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RCTEventEmitter", referenced from:
      _OBJC_CLASS_$_RCTTWVideoModule in RCTTWVideoModule.o
  "_OBJC_METACLASS_$_RCTEventEmitter", referenced from:
      _OBJC_METACLASS_$_RCTTWVideoModule in RCTTWVideoModule.o
  "_OBJC_CLASS_$_RCTViewManager", referenced from:
      _OBJC_CLASS_$_RCTTWLocalVideoViewManager in RCTTWLocalVideoViewManager.o
      _OBJC_CLASS_$_RCTTWRemoteVideoViewManager in RCTTWRemoteVideoViewManager.o
  "_OBJC_METACLASS_$_RCTViewManager", referenced from:
      _OBJC_METACLASS_$_RCTTWLocalVideoViewManager in RCTTWLocalVideoViewManager.o
      _OBJC_METACLASS_$_RCTTWRemoteVideoViewManager in RCTTWRemoteVideoViewManager.o
  "_OBJC_CLASS_$_RCTConvert", referenced from:
      objc-class-ref in RCTTWLocalVideoViewManager.o
      objc-class-ref in RCTTWRemoteVideoViewManager.o
      __OBJC_$_CATEGORY_RCTConvert_$_RCTTWVideoTrackIdentifier in RCTTWRemoteVideoViewManager.o
  "_RCTRegisterModule", referenced from:
      +[RCTTWLocalVideoViewManager load] in RCTTWLocalVideoViewManager.o
      +[RCTTWRemoteVideoViewManager load] in RCTTWRemoteVideoViewManager.o
      +[RCTTWVideoModule load] in RCTTWVideoModule.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

/Users/sudarshanan/Dev/Workings/git-workspace/EquipmentFX-working/efx_mobile_app/ios/Pods/Pods.xcodeproj: warning: MobileCoreServices has been renamed. Use CoreServices instead. (in target 'React-RCTNetwork' from project 'Pods')

Environment

  • Node.js version: v16.15.0
  • React Native version: 0.68.2
  • React Native platform + platform version: iOS simulator

react-native-twilio-video-webrtc

Version: npm version or "master"

Hi @Dart-Sudarshanan ,

Did you find a solution to this? I am facing the same issue

Hi,

Yes I cleared it with a plugin cocoapods-user-defined-build-types.

This issue comes when we use use_framework, it will consider all library as static. So this issue is occurred for me.

To specify build types to library without using use_framework I used this plugin cocoapods-user-defined-build-types.

Place this top of the Podfile:

plugin 'cocoapods-user-defined-build-types'
enable_user_defined_build_types!

eg library,
pod 'react-native-twilio-video-webrtc', path: '../node_modules/react-native-twilio-video-webrtc'
pod 'Firebase/Core', :build_type => :static_framework