docs/getting-started/troubleshooting/react-native.mdx
import useBaseUrl from '@docusaurus/useBaseUrl';
import InternalReactNative from './fb/_react-native.mdx';
Flipper is a 'work in progress' and issues may occur. This page contains known issues associated with React Native and provides steps you can take to try to resolve them.
Make sure the project is using the latest Flipper SDK.
When using Flipper with React Native, two devices should show up:
SM760FS, Pixel 3, android_emulator, and iPhone 11).@react-native-community/cli version is 0.47.0 or higher (using yarn why @react-native-community/cli).cd android && ./gradlew clean, cd iOS && pod install --repo-update.iOS 9.0.Ensure that your device is set to the correct time and time zone for TLS verification to work.
react-native-flipper in your app, and run pod install in the iOS dir afterwards.That is correct. The dependencies won't be included in the release (when using react-native-flipper > 0.45) and can't be excluded from the build process.
On selecting a specific element in the React DevTools, the "Could not inspect element with id XXX" appears when the version of the DevTools shipped in Flipper is incompatible with the react-devtools-core package used by the React Native application.
Flipper supports using a globally installed react-devtools (after using npm install -g [email protected]) instead of the embedded one. This should help with any compatibility issues.
Another way to fix this is to set the resolutions field in the package.json of the app to force a specific version and then run yarn install, for example:
"resolutions": {
"react-devtools-core": "4.13.2"
}
Show Inspector. Flipper now follows the selection on your device.Remote JS Debugging is not enabled).First, make sure your cocoapods is up to date (sudo gem install cocoapods), and that you are using the latest FlipperKit.
For inexplainable build errors, clone and verify if our reference project builds and runs locally. If it does, it's recommended to compare the package.json and ios/Podfile files with yours. If that doesn't yield anything, compare the ios/Podfile.lock as well to verify any transitive pod dependencies need updating.
YogaKit.modulemap not found.xcodeworkspace dir when building from XCode, not the project file. Pods based projects should always be opened this way.cd ios && pod install.sudo xcode-select --switch /Applications/Xcode.app (update path were necessary) and start simulators & Flipper again.If you experience errors such as Undefined symbol: associated type descriptor for FloatLiteralType or Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibility50 after going through the Getting Started page, do the following:
Open your project in Xcode.
Click in your project's name on the left side.
Make sure that you choose your project under PROJECT on the screen that has been opened.
Go to the tab Build Settings.
Search for LD_RUNPATH_SEARCH_PATHS (make sure that All is selected).
Double-click Runpath Search Paths and, in the dialog that opens, click on the plus button at the bottom-left corner and paste /usr/lib/swift $(inherited) there.
Now search for LIBRARY_SEARCH_PATHS.
Double-click Library Search Paths and, in the dialog that opens, add the following items.
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)"
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)"
"$(inherited)"
:::note
All of them should be added as non-recursive (the default).
:::
In the end it should look as follows:
Now you can run your build normally.
Comment out the relevant lines in ios/Podfile and run cd ios && pod install again:
# use_flipper!
# post_install do |installer|
# flipper_post_install(installer)
# end
To speed up CI builds, Flipper can be disabled on CI environments by making the Flipper SDK inclusion conditional (this works on most CI providers, feel free to customize the environment variable):
if !ENV['CI']
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end