-
Notifications
You must be signed in to change notification settings - Fork 94
Config Plugins
Tommy Nguyen edited this page Feb 19, 2024
·
9 revisions
Note
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/
In order to use a config plugin in react-native-test-app
, there are two things you need to do:
- Add
@expo/config-plugins
as a dev dependency:-
Yarn:
yarn add @expo/config-plugins --dev
-
npm:
npm add @expo/config-plugins --save-dev
-
Yarn:
- Add the config plugins you want to use in your
app.json
underplugins
. In the example below, we're adding the config plugin for Reanimated that comes bundledreact-native-test-app
:"presentationStyle": "modal" } ], + "plugins": [ + "react-native-test-app/plugins/reanimated.js" + ], "resources": { "android": [ "dist/res",
The following plugins are included in the package:
-
react-native-test-app/plugins/reanimated.js
— Installs the runtime required by React Native Reanimated
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
— Modifyios/ReactTestApp/BridgeDelegate.mm
as a string (dangerous) -
mods.ios.sceneDelegate
— Modifyios/ReactTestApp/SceneDelegate.swift
as a string (dangerous)