Latest 0.21.1
Homepage https://github.com/facebook/Sonar
License MIT
Platforms ios 8.4

Flipper Build Status Android Maven Badge iOS

Flipper (formerly Sonar) is a platform for debugging mobile apps on iOS and Android. Visualize, inspect, and control your apps from a simple desktop interface. Use Flipper as is or extend it using the plugin API.

Flipper

Table of Contents

Mobile development

Flipper aims to be your number one companion for mobile app development on iOS and Android. Therefore, we provide a bunch of useful tools including a log viewer, interactive layout inspector, and network inspector.

Extending Flipper

Flipper is built as a platform. In addition to using the tools already included, you can create your own plugins to visualize and debug data from your mobile apps. Flipper takes care of sending data back and forth, calling functions, and listening for events on the mobile app.

Contributing to Flipper

Both Flipper’s desktop app and native mobile SDKs are open-source and MIT licensed. This enables you to see and understand how we are building plugins, and of course join the community and help improve Flipper. We are excited to see what you will build on this platform.

In this repo

This repository includes all parts of Flipper. This includes:

  • Flipper’s desktop app built using Electron (/src)
  • native Flipper SDKs for iOS (/iOS)
  • native Flipper SDKs for Android (/android)
  • Plugins:
    • Logs (/src/device-plugins/logs)
    • Layout inspector (/src/plugins/layout)
    • Network inspector (/src/plugins/network)
    • Shared Preferences/NSUserDefaults inspector (/src/plugins/shared_preferences)
  • website and documentation (/website / /docs)

Getting started

Please refer to our Getting Started guide to set up Flipper.

Requirements

  • macOS (while Flipper is buildable using other systems as well, only macOS is officially supported)
  • node >= 8
  • yarn >= 1.5
  • iOS developer tools (for developing iOS plugins)
  • Android SDK and adb

Building from Source

Desktop

Running from source

git clone https://github.com/facebook/flipper.git
cd flipper
yarn
yarn start

NOTE: If you’re on Windows, you need to use Yarn 1.5.1 until this issue is resolved.

Building standalone application

yarn build --mac --version $buildNumber

iOS SDK + Sample App

cd iOS/Sample
rm -f Podfile.lock
pod install --repo-update
open Sample.xcworkspace
<Run app from xcode>

You can omit --repo-update to speed up the installation, but watch out as you may be building against outdated dependencies.

Android SDK + Sample app

Start up an android emulator and run the following in the project root:

./gradlew :sample:installDebug

Documentation

Find the full documentation for this project at fbflipper.com.

Our documentation is built with Docusaurus. You can build
it locally by running this:

cd website
yarn
yarn start

Contributing

See the CONTRIBUTING file for how to help out.

License

Flipper is MIT licensed, as found in the LICENSE file.

Latest podspec

{
    "name": "FlipperKit",
    "version": "0.21.1",
    "license": {
        "type": "MIT"
    },
    "homepage": "https://github.com/facebook/Sonar",
    "summary": "Sonar iOS podspec",
    "authors": "Facebook",
    "static_framework": true,
    "source": {
        "git": "https://github.com/facebook/Sonar.git",
        "tag": "v0.21.1"
    },
    "module_name": "FlipperKit",
    "platforms": {
        "ios": "8.4"
    },
    "default_subspecs": "Core",
    "subspecs": [
        {
            "name": "FBDefines",
            "header_dir": "FBDefines",
            "compiler_flags": "-DDEBUG=1 -DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0",
            "source_files": "iOS/FBDefines/**/*.h",
            "public_header_files": "iOS/FBDefines/**/*.h"
        },
        {
            "name": "CppBridge",
            "header_dir": "CppBridge",
            "dependencies": {
                "Flipper": [
                    "~>0.21.1"
                ]
            },
            "compiler_flags": "-DDEBUG=1 -DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0",
            "source_files": "iOS/FlipperKit/CppBridge/**/*.{h}",
            "private_header_files": "iOS/FlipperKit/CppBridge/**/*.h",
            "preserve_paths": "iOS/FlipperKit/CppBridge/**/*.h",
            "pod_target_xcconfig": {
                "USE_HEADERMAP": "NO",
                "ONLY_ACTIVE_ARCH": "YES",
                "DEFINES_MODULE": "YES",
                "HEADER_SEARCH_PATHS": ""$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/DoubleConversion" "$(PODS_ROOT)/FlipperKit/iOS/**/""
            }
        },
        {
            "name": "FBCxxUtils",
            "header_dir": "FBCxxUtils",
            "compiler_flags": "-DDEBUG=1 -DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0",
            "dependencies": {
                "Flipper-Folly": [
                    "~> 1.3"
                ]
            },
            "source_files": "iOS/FlipperKit/FBCxxUtils/**/*.{h,mm}",
            "private_header_files": "iOS/FlipperKit/FBCxxUtils/**/*.h",
            "pod_target_xcconfig": {
                "USE_HEADERMAP": "NO",
                "ONLY_ACTIVE_ARCH": "YES",
                "DEFINES_MODULE": "YES",
                "HEADER_SEARCH_PATHS": ""$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/DoubleConversion""
            }
        },
        {
            "name": "FKPortForwarding",
            "header_dir": "FKPortForwarding",
            "dependencies": {
                "CocoaAsyncSocket": [
                    "~> 7.6"
                ],
                "Flipper-PeerTalk": [
                    "~>0.0.4"
                ]
            },
            "compiler_flags": "-DDEBUG=1 -DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0",
            "source_files": "iOS/FlipperKit/FKPortForwarding/FKPortForwarding{Server,Common}.{h,m}",
            "private_header_files": "iOS/FlipperKit/FKPortForwarding/FKPortForwarding{Server,Common}.h"
        },
        {
            "name": "Core",
            "dependencies": {
                "FlipperKit/FBDefines": [],
                "FlipperKit/FBCxxUtils": [],
                "FlipperKit/CppBridge": [],
                "FlipperKit/FKPortForwarding": [],
                "Flipper": [
                    "~>0.21.1"
                ]
            },
            "compiler_flags": "-DDEBUG=1 -DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0",
            "source_files": [
                "iOS/FlipperKit/*.{h,m,mm}",
                "iOS/FlipperKit/CppBridge/*.{h,mm}"
            ],
            "public_header_files": "iOS/FlipperKit/**/{FlipperDiagnosticsViewController,FlipperStateUpdateListener,FlipperClient,FlipperPlugin,FlipperConnection,FlipperResponder,SKMacros}.h",
            "pod_target_xcconfig": {
                "USE_HEADERMAP": "NO",
                "ONLY_ACTIVE_ARCH": "YES",
                "DEFINES_MODULE": "YES",
                "HEADER_SEARCH_PATHS": ""$(PODS_ROOT)/FlipperKit/iOS/FlipperKit/" "$(PODS_ROOT)/Headers/Private/FlipperKit/" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/boost-for-react-native""
            }
        },
        {
            "name": "FlipperKitLayoutPlugin",
            "header_dir": "FlipperKitLayoutPlugin",
            "dependencies": {
                "FlipperKit/Core": [],
                "Yoga": [
                    "~> 1.14"
                ],
                "YogaKit": [
                    "~> 1.14"
                ]
            },
            "compiler_flags": "-DDEBUG=1 -DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0",
            "public_header_files": [
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h",
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKTapListener.h",
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKInvalidation.h",
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKDescriptorMapper.h"
            ],
            "private_header_files": [
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKTouch.h",
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKNodeDescriptor.h",
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKNamed.h",
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKObject.h",
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKHighlightOverlay.h",
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/UIColor+SKSonarValueCoder.h",
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/utils/SKObjectHash.h",
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/utils/SKSwizzle.h",
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/utils/SKYogaKitHelper.h"
            ],
            "source_files": "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/**/*.{h,cpp,m,mm}",
            "pod_target_xcconfig": {
                "HEADER_SEARCH_PATHS": ""$(PODS_ROOT)"/Headers/Private/FlipperKit/**",
                "ONLY_ACTIVE_ARCH": "YES"
            }
        },
        {
            "name": "FlipperKitLayoutComponentKitSupport",
            "header_dir": "FlipperKitLayoutComponentKitSupport",
            "dependencies": {
                "FlipperKit/Core": [],
                "Yoga": [
                    "~> 1.14"
                ],
                "ComponentKit": [
                    "~> 0.27"
                ],
                "FlipperKit/FlipperKitLayoutPlugin": []
            },
            "compiler_flags": "-DDEBUG=1 -DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0",
            "public_header_files": [
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/FlipperKitLayoutComponentKitSupport.h",
                "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKSubDescriptor.h"
            ],
            "source_files": "iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/**/*.{h,cpp,m,mm}",
            "pod_target_xcconfig": {
                "HEADER_SEARCH_PATHS": ""$(PODS_ROOT)"/Headers/Private/FlipperKit/**",
                "ONLY_ACTIVE_ARCH": "YES"
            }
        },
        {
            "name": "FlipperKitNetworkPlugin",
            "header_dir": "FlipperKitNetworkPlugin",
            "dependencies": {
                "FlipperKit/Core": []
            },
            "compiler_flags": "-DDEBUG=1 -DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0",
            "public_header_files": [
                "iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/SKBufferingPlugin.h",
                "iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/SKNetworkReporter.h",
                "iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/SKRequestInfo.h",
                "iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/SKResponseInfo.h",
                "iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h"
            ],
            "source_files": "iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/*.{h,cpp,m,mm}",
            "pod_target_xcconfig": {
                "HEADER_SEARCH_PATHS": ""$(PODS_ROOT)"/Headers/Private/FlipperKit/**"
            }
        },
        {
            "name": "SKIOSNetworkPlugin",
            "header_dir": "SKIOSNetworkPlugin",
            "dependencies": {
                "FlipperKit/Core": [],
                "FlipperKit/FlipperKitNetworkPlugin": []
            },
            "compiler_flags": "-DDEBUG=1 -DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0",
            "public_header_files": "iOS/Plugins/FlipperKitNetworkPlugin/SKIOSNetworkPlugin/SKIOSNetworkAdapter.h",
            "source_files": "iOS/Plugins/FlipperKitNetworkPlugin/SKIOSNetworkPlugin/**/*.{h,cpp,m,mm}",
            "pod_target_xcconfig": {
                "HEADER_SEARCH_PATHS": ""$(PODS_ROOT)"/Headers/Private/FlipperKit/**"
            }
        },
        {
            "name": "FlipperKitUserDefaultsPlugin",
            "header_dir": "FlipperKitUserDefaultsPlugin",
            "dependencies": {
                "FlipperKit/Core": []
            },
            "compiler_flags": "-DDEBUG=1 -DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0",
            "public_header_files": "iOS/Plugins/FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h",
            "source_files": "iOS/Plugins/FlipperKitUserDefaultsPlugin/**/*.{h,m}",
            "pod_target_xcconfig": {
                "HEADER_SEARCH_PATHS": ""$(PODS_ROOT)"/Headers/Private/FlipperKit/**"
            }
        },
        {
            "name": "FlipperKitExamplePlugin",
            "header_dir": "FlipperKitExamplePlugin",
            "dependencies": {
                "FlipperKit/Core": []
            },
            "compiler_flags": "-DDEBUG=1 -DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0",
            "public_header_files": "iOS/Plugins/FlipperKitExamplePlugin/FlipperKitExamplePlugin.h",
            "source_files": "iOS/Plugins/FlipperKitExamplePlugin/**/*.{h,mm}",
            "pod_target_xcconfig": {
                "HEADER_SEARCH_PATHS": ""$(PODS_ROOT)"/Headers/Private/FlipperKit/**"
            }
        }
    ]
}

Pin It on Pinterest

Share This