11

I added a new build configuration, Dev.Debug to my react-native project in xcode, duplicating the existing Debug configuration, and also added a corresponding scheme for the new configuration.

Now when I attempt to run the project with the new scheme I get the error:

Undefined symbol: _OBJC_CLASS_$_FlipperClient

Running the scheme that I duplicated works fine - the app installs, launches, and functions normally.

Is there any more configuration required after adding a new debug scheme?

OffensivelyBad
  • 621
  • 8
  • 16

3 Answers3

5

I found that I needed to modify my podfile as follows:

...

target 'MyApp' do
  config = use_native_modules!
  
  # Add the project and build configurations
  project 'MyApp',
    'Dev.Debug' => :debug, # '{Build Configuration name}' => :{debug or release}
    'Debug' => :debug,
    'Dev.Release' => :release,
    'Release' => :release
...

use_flipper!({'Flipper' => '0.126.0', configurations: ['Debug', 'Dev.Debug']}) # Add the Build Configuration name (not scheme name)

...
OffensivelyBad
  • 621
  • 8
  • 16
  • 8 hours of searching and this is what solved it for me. Thanks! I ended up not declaring the flipper versions in the end, so it looked like this for me: `use_flipper!({ configurations: ['Debug', 'Dev.Debug'] })` – seedBoot Jul 31 '22 at 11:56
4

In my case I updated to react native: 0.70.* and Flipper to version 174 and had this error. Downgrading Flipper to 163 fixed the issue for me.

More info here: https://github.com/facebook/flipper/issues/4278

Ovidiu Cristescu
  • 821
  • 7
  • 19
2

In recent versions of React Native, AppDelegate.mm has replaced the legacy Flipper initialisation code with RCTAppSetupPrepareApp(application); and I had forgotten to do so. This caused the issue for me. Fixing it solved the issue. See https://react-native-community.github.io/upgrade-helper/ for the diffs.

Karatekid430
  • 940
  • 11
  • 25