README.md
1# expo-dev-menu
2
3Expo/React Native module to add developer menu to Debug builds of your application. This package is intended to be included in your project through [`expo-dev-client`](https://docs.expo.dev/develop/development-builds/introduction/#what-is-an-expo-dev-client).
4
5## Documentation
6
7You can find more information in the [Expo documentation](https://docs.expo.dev/develop/development-builds/introduction).
8
9## Contributing
10
11The `expo-dev-menu` repository consists of two different parts, the exported package, which includes the native functions, located in the `android`, `ios` and `src` folders and the Dev Menu interface, located under the `app` folder.
12
13Local development is usually done through [`bare-expo`](/apps/bare-expo).
14
15First, make sure to `yarn` and `yarn start` in `expo-dev-menu` which will add the port for the dev menu packager to [`dev-menu-packager-host`](./assets/dev-menu-packager-host`). This is bundled into the native code in `bare-expo` so need to be done first.
16
17To use `dev-client` when running `bare-expo` on Android, open [MainApplication.java](/apps/bare-expo/android/app/src/main/java/dev/expo/payments/MainApplication.java) and set the `USE_DEV_CLIENT` value to `true`.
18
19```diff
20- static final boolean USE_DEV_CLIENT = false;
21+ static final boolean USE_DEV_CLIENT = true;
22```
23
24To use `dev-client` when running `bare-expo` on iOS, open [AppDelegate.mm](/apps/bare-expo/ios/BareExpo/AppDelegate.mm) and set the `USE_DEV_CLIENT` value to `YES`.
25
26```diff
27- BOOL useDevClient = NO;
28+ BOOL useDevClient = YES;
29```
30
31Then build the native apps with `npx pod-install && yarn ios` or `yarn android`.
32
33### Making JavaScript changes inside the `app` folder
34
35To update the JavaScript code inside the `app` folder, you need to run the `dev-menu` bundler locally.
36
371. Navigate to the `dev-menu` package: `cd packages/expo-dev-menu`
382. Start the Metro bundler: `yarn start`
393. To use your local bundler on Android, open [DevMenuHost.java](/packages/expo-dev-menu/android/src/debug/java/expo/modules/devmenu/DevMenuHost.kt) and set `getUseDeveloperSupport` to `true`.
40
41```diff
42- override fun getUseDeveloperSupport() = false
43+ override fun getUseDeveloperSupport() = true
44```
45
464. Play with your changes on a simulator or device through `bare-expo`
475. Once you've made all the necessary changes run `yarn bundle:prod:ios && yarn bundle:prod:android` to update the embedded bundle
48