-
Notifications
You must be signed in to change notification settings - Fork 95
Config Plugins
Tommy Nguyen edited this page Nov 20, 2023
·
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-pluginsas a dependency in yourpackage.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", - Add the config plugins you want to use in your
app.jsonunderplugins. 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.mmas a string (dangerous) -
mods.ios.sceneDelegate— Modifyios/ReactTestApp/SceneDelegate.swiftas a string (dangerous)