Skip to content

Config Plugins

Tommy Nguyen edited this page Jul 12, 2023 · 9 revisions

react-native-test-app added support for Expo's Config Plugins in version 2.0. You can find the full documentation here: https://docs.expo.dev/config-plugins/introduction/

Usage

In order to use a config plugin in react-native-test-app, there are two things you need to do:

  1. Add @expo/config-plugins as a dependency in your package.json:
       },
       "devDependencies": {
         "@babel/core": "^7.0.0",
    +    "@expo/config-plugins": "^5.0.0",
         "@types/jest": "^27.0.0",
         "@types/react-native": "^0.68.0",
         "jest": "^27.0.0",
  2. Add the config plugins you want to use in your app.json under plugins. In the example below, we're adding the config plugin for Reanimated that comes bundled react-native-test-app:
           "presentationStyle": "modal"
         }
       ],
    +  "plugins": [
    +    "react-native-test-app/plugins/reanimated.js"
    +  ],
       "resources": {
         "android": [
           "dist/res",

Bundled Plugins

The following plugins are included in the package:

Default Mods

As of writing, most of the mods that come with @expo/config-plugins work out-of-box, with the sole exception being the Expo specific mods.ios.expoPlist. Additionally, the following react-native-test-app specific mods have been defined:

  • mods.ios.bridgeDelegate — Modify ios/ReactTestApp/BridgeDelegate.mm as a string (dangerous)
  • mods.ios.sceneDelegate — Modify ios/ReactTestApp/SceneDelegate.swift as a string (dangerous)
Clone this wiki locally