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.

iOS - react-native-flipper includes FlipperKit, even in Release configuration

See original GitHub issue

🐛 Bug Report

If you’re using react-native-flipper and do pod install, the included files assume you have FlipperKit installed.

However, if you have lines like these in your Podfile, FlipperKit will only be installed when your application is run in Debug configuration.

def add_flipper_pods!
  version = '~> 0.33.1'
  pod 'FlipperKit', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/SKIOSNetworkPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitReactPlugin', version, :configuration => 'Debug'
end

Creating a release build will fail.

I upgraded from RN 0.61.5 to 0.62 and did the migration by hand, so I might’ve missed something that prevents this bug from happening on a fresh 0.62 install.

To Reproduce

  1. Install react-native
  2. npm i --save-dev react-native-flipper
  3. Do pod install
  4. Create a release build
  5. Get this error:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FlipperClient", referenced from:
      objc-class-ref in libreact-native-flipper.a(FlipperReactNativeJavaScriptPluginManager.o)

When react-native-flipper is removed and pod install is ran again, a release build will compile again.

Environment

iOS

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:13
  • Comments:43 (24 by maintainers)

github_iconTop GitHub Comments

17reactions
tr3v3rcommented, Apr 13, 2020

@mweststrate After upgrade to react-native v. 0.62.2 and react-native-flipper v. 0.37 the issue still presents 😭

As a workaround I had to disable auto-link for react-native-flipper for iOS. And manually add pods installation for react-native-flipper with Debug configutation

react-native-config.js

module.exports = {
  dependencies: {
    ...
    'react-native-flipper': {
      platforms: {
        ios: null,
      },
    },
    ...
  },
}

pods

pod 'react-native-flipper', :path => '../node_modules/react-native-flipper/react-native-flipper.podspec', :configuration => 'Debug'

I hope it helps.

9reactions
nvdnvd00commented, May 9, 2020

yeah, it’s working but i think we need a solution, not workaround

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding Flipper to Generic iOS Apps
platform :ios, '10.0' # It is likely that you'll only want to include Flipper in debug builds, # in which case you add...
Read more >
FlipperKit on CocoaPods.org
Flipper (formerly Sonar) is a platform for debugging mobile apps on iOS and Android and, recently, even JS apps in your browser or...
Read more >
Upgrade to React Native 0.62 - Matt Oakes
React Native 0.62 has been a long time coming and brings many changes, large and small. This article explains what's new, how to...
Read more >
React Native Upgrade Helper
Release 0.62. React Native 0.62 includes built-in integration with Flipper. ... [iOS] Tutorial on upgrading Xcode-related files to React Native 0.62 ...
Read more >
PhaseScriptExecution [CP-User] error in React Native
When you run react-native run-ios, react-native will try to deploy with the target in his config file, but on Xcode the problem is...
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