Summary: In line with, https://github.com/facebook/flipper/pull/874/files, the package should promote itself as iOS 9.0 compatibe, to prevent errors and warnings like: ``` mweststrate-mbp:ios mweststrate$ pod install Detected React Native module pod for react-native-flipper Analyzing dependencies Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec` Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec` Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec` [!] CocoaPods could not find compatible versions for pod "react-native-flipper": In Podfile: react-native-flipper (from `../node_modules/react-native-flipper`) Specs satisfying the `react-native-flipper (from `../node_modules/react-native-flipper`)` dependency were found, but they required a higher minimum deployment target. ``` ``` mweststrate-mbp:ios mweststrate$ pod install Detected React Native module pod for react-native-flipper Analyzing dependencies Downloading dependencies Installing react-native-flipper 0.33.1 Generating Pods project Integrating client project Pod installation complete! There are 34 dependencies from the Podfile and 38 total pods installed. [!] The platform of the target `ReactNativeFlipperExample` (iOS 9.0) may not be compatible with `react-native-flipper (0.33.1)` which has a minimum requirement of iOS 10.0. [!] The platform of the target `ReactNativeFlipperExampleTests` (iOS 9.0) may not be compatible with `react-native-flipper (0.33.1)` which has a minimum requirement of iOS 10.0. mweststrate-mbp:ios mweststrate$ cd .. mweststrate-mbp:ReactNativeFlipperExample ``` Reviewed By: passy Differential Revision: D20362156 fbshipit-source-id: 766d033f2ea2e5559a72a3473115bc4a470a284f
react-native-flipper
This package exposes JavaScript bindings to talk from React Native JavaScript directly to flipper.
This package might also be required by other Flipper plugins for React Native.
Installation
Run the following command in the root of your React Native project
yarn add react-native-flipper
Note that this package requires React Native 0.62 or higher.
Usage
How to build Flipper plugins is explained in the flipper documentation: Creating a Flipper plugin. Building a Flipper plugin involves building a plugin for the Desktop app, and a plugin that runs on a Device (Native Android, Native IOS or React Native). This package is only needed for the plugin that runs on the mobile device, in React Native, and wants to use the JavaScript bridge.
This package exposes one method: addPlugin.
The addPlugin accepts a plugin parameter, that registers a client plugin and will fire the relevant callbacks if the corresponding desktop plugin is selected in the Flipper Desktop. The full plugin API is documented here.
Example
An example plugin can be found in examples/FlipperTicTacToe.js.
The corresponding Desktop plugin ships by default in Flipper, so importing the above file and dropping the <FlipperTicTacToe /> component somewhere in your application should work out of the box.
The sources of the corresponding Desktop plugin can be found here.