question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

0.62.2 -> 0.63.2 - Xcode error: Undefined symbol: _OBJC_CLASS_$_FlipperKitNetworkPlugin

See original GitHub issue

Environment

System: OS: macOS 10.15.6 CPU: (8) x64 Intel® Core™ i5-8257U CPU @ 1.40GHz Memory: 2.05 GB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 14.4.0 - /usr/local/bin/node Yarn: Not Found npm: 6.14.4 - /usr/local/bin/npm Watchman: Not Found Managers: CocoaPods: 1.9.3 - /Users/username/Software/ruby/bin/pod SDKs: iOS SDK: Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: Not Found IDEs: Android Studio: 4.0 AI-193.6911.18.40.6514223 Xcode: 11.6/11E708 - /usr/bin/xcodebuild Languages: Java: 14.0.1 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.2 => 0.62.2 npmGlobalPackages: react-native: Not Found

Upgrading version

0.62.2 -> 0.63.2

Description

I recently upgraded from 0.61.5 to 0.62.2 and followed https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.62.2 and https://github.com/react-native-community/upgrade-support/issues/13 Having multiple targets inside Podfile I found that i have to add a custom configuration to Flipper pods as presented here: https://github.com/react-native-community/upgrade-support/issues/30#issuecomment-608495255

After that the whole build started to work flawless.

Now I wanted to upgrade to 0.63.2 and now the React native and Flipper pods were moved to ‘…/node_modules/react-native/scripts/react_native_pods’ without any possibility to specify: :configuration => [‘Debug-dev’, ‘Release-dev’] and now i get the same error: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_FlipperKitNetworkPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_SKIOSNetworkAdapter", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_FlipperKitReactPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_FKUserDefaultsPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_FlipperKitLayoutPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_SKDescriptorMapper", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_FlipperClient", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Reproducible demo

n/a

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:10
  • Comments:14

github_iconTop GitHub Comments

23reactions
KristineTronacommented, Oct 16, 2020

None of the above fixes worked for me. I have no idea if this is a good fix, but I changed the following in AppDelegate.m and it seems to have worked for me:

    #ifdef FB_SONARKIT_ENABLED
      InitializeFlipper(application);
    #endif

to

  #if DEBUG
    #ifdef FB_SONARKIT_ENABLED
      InitializeFlipper(application);
    #endif
  #endif
13reactions
aprilmintacpinedacommented, Oct 1, 2020

I have tried upgrading to latest version of react, I still get the same error, I’m trying to build for multiple environments (local, staging, and prod) and I want to be able to install them all on the same device and be able to use them as if they are different apps, I’m following this guide on that http://blog.logicwind.com/adding-multiple-target/

but I got these errors image

Here’s my Podfile

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

project 'embrace',
        'Debug' => :debug,
        'Release' => :release,
        'Local.Debug' => :debug,
        'Local.Release' => :release, 
        'Staging.Debug' => :debug,
        'Staging.Release' => :release

target 'embrace' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'embraceTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

target 'embrace-tvOS' do
  # Pods for embrace-tvOS

  target 'embrace-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end
Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode Build error with React Nativ… | Apple Developer Forums
It works fine on the simulator. Xcode 12.5 and React Native 0.63.3 I've tried a clean build. deleted and reinstalled Pods. Undefined symbols...
Read more >
How to slove xcode build error 'Undefined symbols for ...
How can I fix this, please give me some ideas, I'm new to ios development. cpu: m1 pro. system: macOS12.3. xcode: 13.4. react...
Read more >
Library Not Found For -Ldoubleconversion React Native 0.62 ...
<div><p>despite me specifying the python3 version I want to use cmake seems 0.62.2 > 0.63.2 Xcode error: Undefined symbol: OBJCCLASSFlipperKitNetworkPlugin ...
Read more >
error (xcode): undefined symbol: __swift_force_load_$_ ...
Please fill in the versions you're currently using: apollo-ios SDK version: 0.3.0; Xcode version: Xcode 13; Swift version: 5.5.0; Package manager: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found