Pentagura
Pentagura

Reputation: 601

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_RCTImageLoader"

After a lot of tests, my app won't run on iOS.

I have this error :

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RCTImageLoader", referenced from:
     objc-class-ref in libRCTImageResizer.a(RCTImageResizer.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I use :

react: 16.12.0
react-native: 0.60.6

Upvotes: 6

Views: 13411

Answers (3)

Nirav Patel
Nirav Patel

Reputation: 29

Remove "use_frameworks!" and use "cocoapods-user-defined-build-types" plugin in pod file, This plugin allows for a Podfile to specify how each Pod (or multiple Pods) should be built (ex. as a dynamic framework).

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

enable_user_defined_build_types!

target "CoffeeApp" do
    pod 'Alamofire'
    pod "SwiftyJSON", :build_type => :dynamic_framework

https://github.com/joncardasis/cocoapods-user-defined-build-types

its work..

Upvotes: 0

JalilIrfan
JalilIrfan

Reputation: 158

Hey i got a work around from another source here I had to add in another framework called "RNCMaskedView" along with "RNSScreen"

pre_install do |installer|
 installer.pod_targets.each do |pod|
   if pod.name.eql?('RNScreens') || pod.name.eql?('RNCMaskedView')
     def pod.build_type
       Pod::BuildType.static_library
     end
   end
  end
end

Instead you can try adding "RCTImageLoader" and follow up with other frameworks if the error is thrown from other frameworks

Just add the code at the bottom of the pod file save it Open terminal , go to the ios folder in your project and run "pod install"

Then come back to Xcode , clear your build cmd + shift + k Give build

It should work fine

Upvotes: 3

Yasir Perwez
Yasir Perwez

Reputation: 56

It looks like you are trying to run the application on simulator and the libarary for RCTImageResizer is not available for simulator.

Can you please try to run it on device and check.

Upvotes: 0

Related Questions