Plugins: Mobile part

Flipper Internals

Getting Started

Flipper helps you debug Android and iOS apps running in an emulator/simulator or connected physical development devices. Flipper consists of two parts:

The desktop app for macOS

The native mobile SDKs for Android and iOS

To use Flipper, you need to add the mobile SDK to your app.

Setup

Desktop app

The desktop part of Flipper doesn't need any particular setup. Simply download the latest build of our app and launch it. The desktop app is available for macOS and requires a working installation of the Android/iOS development tools on your system.

Once you start Flipper and launch an emulator/simulator or connect a device, you will already be able to see the device logs in Flipper. To see app specific data, you need to integrate our native SDKs with your app.

Setup your Android app

Add the following permissions to your AndroidManifest.xml. The SDK needs these to communicate with the desktop app on localhost via adb. It won't make any external internet requests.

Flipper is distributed via JCenter. Add the dependencies to your build.gradle file.
You should also explicitly depend on soloader
instead of relying on transitive dependency resolution which is getting deprecated
with Gradle 5.

Install the dependencies by running pod install.When you open the Xcode workspace file for your app, you now can import and initialize Flipper in your AppDelegate. Before running your app, make sure that the flag -DFB_SONARKIT_ENABLED=1 is present in the OTHER_CFLAGS in your application's build settings.

Install the dependencies by running pod install.When you open the Xcode workspace file for your app, you now can import and initialize Flipper in your AppDelegate by following the below mentioned example. Before running your app, make sure that the flag -Xcc -DFB_SONARKIT_ENABLED is present in the OTHER_SWIFT_FLAGS in your application's build settings.

We haven't released the dependency to CocoaPods yet, here is the issue by which you can track.

If you do not use CocoaPods as a dependency management tool then currently there is no way to integrate FlipperKit other than manually including all the dependencies and building it.

For Android, Flipper works with both emulators and physical devices connected through USB. However on iOS, we don't yet support physical devices.

Ready for takeoff

Finally, you need to add plugins to your Flipper client. Above we have only added the Layout Inspector plugin to get you started. See Network Plugin and Layout Inspector Plugin for information on how to add them, and also enable Litho or ComponentKit support. You can check the sample apps in the GitHub repo for examples of integrating other plugins.