Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

expo-community-flipper

jakobo4kMIT48.0.1TypeScript support: included

Flipper Support for Expo Apps < SDK 48

flipper, expo, eas, react-native, config-plugin

readme

expo-community-flipper

Flipper Support for Expo Apps <= SDK 47

🎉 As of Expo 48, Flipper support is available via the official build-properties plugin, with a simpler interface and proper support! read the docs announcement
If you're running into issues with the official build-properties plugin, check for an existing issue

⚠️ (SDK 46, 47) Please see this issue about known compatibility issues with other plugins.


The remainder of this README applies to installing expo-community-flipper for SDK 47 and earlier.

Usage (Quick Guide)

1. Install this module: yarn add expo-community-flipper

2. Add expo-community-flipper configuration to the plugins section of your app.json, as per the examples below. You have the option to specify the version of Flipper, though the one built in with React Native is (usually) sufficient.

If you don't specify anything, expo-community-flipper will default to the version of Flipper bundled with the version of React Native you're currently using.

Configuration

type FlipperOptions =
  | undefined // take the default options for the entire plugin
  | string // sets <root>.version and takes defaults for all nested options
  | {
      version?: string; // sets the flipper version to build against (defaults to undefined, uses react-native bundled version)
      ios?:
        | boolean // sets <root>.ios.enabled and takes defaults for all nested options
        | {
            enabled: boolean; // enable flipper for iOS (default true)
            stripUseFrameworks?: boolean; // strip instances of use_frameworks from the Podfile (default false)
          };
      android?:
        | boolean // sets <root>.android.enabled and takes defaults for all nested options
        | {
            enabled: boolean; // enable flipper for Android (default true)
          };
    };

Configuration of this plugin is done in app.json. all configurations are optional with defaults designed to minimize the chances of your build breaking.

{
  "expo": {
    "..."
    "plugins": [
      "expo-community-flipper"
    ]
  }
}

// or configured (See FlipperOptions above):

{
  "expo": {
    "..."
    "plugins": [
      ["expo-community-flipper", FlipperOptions]
    ]
  }
}

Disabling Flipper in CI (>= 45.1.0)

🛠️ 47.0.1 expo-community-flipper now supports the standard ENV['NO_FLIPPER'] == 1 flag to disable flipper. You may also simply omit this plugin via app.config.js when building a production version of your app, as Flipper is not enabled by default.

📜 Prior to 47.0.1, Flipper was disabled using ENV['FLIPPER_DISABLE'] == "1". This is still supported, but deprecated in favor of the emerging standard from the react-native team. In production, Flipper is automatically disabled by the react-native framework, but see this issue regarding a possible regression in upstream react-native/flipper.

Windows Users + Hermes

As of right now, using Windows with the Hermes engine requires you to run your app inside of a WSL environment. The tracked issue is here and if you have a Podfile, please let me know. It's likely an upstream issue, but we're continuing to look at build artifacts in case we spot something that may resolve this issue.

Versions

Starting with Expo SDK 46, Flipper manages its own compatibility layer (though it can be upgraded by specifying a version of Flipper that you want). Prior to SDK 46, we recommended running Flipper @ 0.123.0 as it had the widest range of compatibility with devices and simulators.

This package follows expo's policy for the deprecation of old SDKs. It's MAJOR version tracks against the Expo SDK version, making it easy to spot compatibility differences in your package.json file.

Testing

An /example directory is built with expo init example for each major SDK release with a default eas.json file. The plugin is directly linked using expo's filepath support for config plugins. You can run expo prebuild in the directory to verify the plugin is modifying build files appropriately.

example eas.json

{
  "cli": {
    "version": ">= 0.35.0"
  },
  "build": {
    "example": {
      "releaseChannel": "default",
      "channel": "default"
    }
  }
}

example app.json

{
  "expo": {
    "...": "... standard app.json entries ...",
    "plugins": [["./../build/withFlipper", "0.158.0"]]
  }
}

References

Contributors ✨

All Contributors

Thanks goes to these wonderful people (emoji key):

Jakob Heuser
Jakob Heuser

💻
gregfenton
gregfenton

📖
AronBe
AronBe

📖
rlam3
rlam3

📖
Slapbox
Slapbox

🐛
Jeremy Gollehon
Jeremy Gollehon

🐛
Nikola Kalinov
Nikola Kalinov

🐛
Kudo Chien
Kudo Chien

📖 💬 💻
Maxence Gilliot
Maxence Gilliot

💬
Andrew Gerber
Andrew Gerber

🐛
Pim Knops
Pim Knops

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

changelog

⚠️ NOTE This project's major semver matches the supported Expo SDK version. This helps spot inconsistencies between your Expo SDK and this plugin, as well as ensuring any changes to the upstream config-plugins system are properly addressed.

48.x.x (Expo SDK 48)

Project is now part of the official expo build-properties-plugin https://docs.expo.dev/versions/latest/sdk/build-properties/

48.0.1

  • Improves failure message if running SDK 48 and the build-properties-plugin is available in the expo template

47.x.x (Expo SDK 47)

47.0.2

🛠️ Fixes
  • Fixes issue where Dev.Debug was not a whitelisted metro configuration 45ed26d #49

47.0.1

🛠️ Fixes
  • Added support for the default NO_FLIPPER emerging standard c6e0732
  • Added support for all profiles, possibly related to a regression where react-native would attempt to bundle a non-linked flipper resulting in a symbole error _OBJC_CLASS_$_FlipperClient c6e0732

47.0.0

Release for compatibility with SDK 47.

46.x.x (Expo SDK 46)

46.0.2

🛠️ Fixes
  • Added the ability to explicitly enable/disable flipper on a per platform level ref
  • Added the ability to strip use_frameworks on iOS ref
🧹 Chores
  • Adds all-contributors. Thank you to every single person who's helped make expo-community-flipper awesome ❤️

46.0.1

Migration If you were using individual pod specifications (folly, etc), you can remove all of that now. The Flipper team recommends using only the Flipper version, relying on the pod and maven to pull down the necessary dependencies.

🛠️ Fixes
  • Fixes a breaking issue with Podfile generation introduced in react-native 0.69.2 ref
    • Removes the legacy use_flipper declaration
    • Removes the post_install flipper code
    • Removes the AppDelegate code as the RCTAppSetupUtils already exist and this was redundant ref
  • Removes individual pod configs as those are no longer encouraged by the FB Flipper Team
  • Removed old SDK tests

46.0.0

💥 BREAKING CHANGES
  • Requires Expo SDK 46, which is now actively checked using semver against the config's SDK version. In React Native 0.68+, the AppDelegate files are all objective-c++, and there is no withAppDelegate support for swift files. The Semver check avoids a footgun of running this plugin with SDK 45 and swift AppDelegate files and ending up with non-functional flipper.

Migration Please upgrade to the latest Expo SDK. expo-community-flipper only maintains versions that are compatible with the supported Expo SDK versions.

🛠️ Fixes
🧹 Chores
  • Upgrades Expo SDK requirement to 46

45.x.x (Expo SDK 45)

45.1.0

  • Adds the ability to disable flipper via an ENV variable in EAS / Expo builds FLIPPER_DISABLE
  • Adds a post install step required by Flipper for native modules

45.0.0

  • Revised version to match latest Expo SDK. No plugin API changes.

44.x.x (Expo SDK 44)

44.0.2

  • (docs) Adds table of compatible flipper versions ref
  • (docs) Updates published README urls ref

44.0.1

  • Resolved idempotency issue with merging flipper into podfiles that contain a use-flipper directive ref
  • (chore) Created an example application that can be used for future triage

44.0.0

  • Revised version to match latest Expo SDK. No plugin API changes.

43.x.x (Expo SDK 43)

43.0.5

  • Allows for specifying a universal flipper version as a string argument to the plugin
  • build/ directory is committed for transparency
  • Prevents footgun where you could specify Flipper's pods without specifying a Flipper version

43.0.1

  • Adds support for specifying individual pod versions