[dev-launcher] Launch directly into previously opened project (#24614)# Why Closes ENG-10041 # How In order to allow users to launch directly into previously opened projects, this PR upda
[dev-launcher] Launch directly into previously opened project (#24614)# Why Closes ENG-10041 # How In order to allow users to launch directly into previously opened projects, this PR updates `startWithWindow` and `handleIntent` to try to launch from the most recent URL of the RecentlyOpenedAppsRegistry. If the bundle cannot be loaded, it falls back to the regular launcher. This also refactors the existing dev-client and dev-launcher config plugins adding a new `tryToLaunchLastOpenedBundle` parameter to the Android and iOS plugin config types. E.g. ```json "plugins": [ [ "expo-dev-client", { "android": { "tryToLaunchLastOpenedBundle": true }, "ios": { "tryToLaunchLastOpenedBundle": true } } ] ] ``` # Test Plan Run dev-client through bare-expo on Android and iOS testing opening the app directly, with and without "Recent Apps" and opening through deep links # Checklist - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). --------- Co-authored-by: Łukasz Kosmaty <[email protected]>
show more ...
[android][dev-launcher][dev-menu] Fix eventemitter error when fabric is enabled (#22977)# Why Updating react-native to the new RC revealed a misconfiguration on dev-client when using the new ar
[android][dev-launcher][dev-menu] Fix eventemitter error when fabric is enabled (#22977)# Why Updating react-native to the new RC revealed a misconfiguration on dev-client when using the new architecture, which was causing the app to crash. <img width="402" alt="image" src="https://github.com/expo/expo/assets/11707729/51c381d3-b41f-430a-a20c-9d9a7ddd8722"> Closes ENG-7955 # How - Replace `ReactActivityDelegate` with the new `DefaultReactActivityDelegate` class - Close the DevMenu from the native side before opening Dev Menu from React Native - Update DevMenu bundle # Test Plan Run dev-client locally through fabric-tester and bare-expo <table> <tr><th>fabric-tester</th><th>bare-expo</th></tr> <tr> <td> <video src="https://github.com/expo/expo/assets/11707729/f6bacf5d-f257-4d7c-9864-65df9b734048"/> </td> <td> <video src="https://github.com/expo/expo/assets/11707729/99205a53-2144-4ee0-981e-bcd2d8285212" /> </td> </tr> </table> # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
[dev-launcher] fix hermes inspector connection issue (#22726)# Why fixes #20280 close ENG-8769 # How our original `stopInspector() -> startInspector()` is not reliable because of thread r
[dev-launcher] fix hermes inspector connection issue (#22726)# Why fixes #20280 close ENG-8769 # How our original `stopInspector() -> startInspector()` is not reliable because of thread race condition issue. looking into the [react-native code](https://github.com/facebook/react-native/blob/7f22db8ea034d1aed74103542b04af2a8a11caa1/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java#L207-L241), it posts task to background AsyncTask thread pool. so it could happen two different error cases: ### Case 1 with empty inspector targets `http://localhost:8081/json/list` returns empty array 1. openInspectorConnection() from ReactInstanceManager posted task 2. openInspectorConnection() from ReactInstanceManager executed in AsyncTask thread pool 3. closeInspectorConnection() from DevLauncherReactUtils posted task 4. openInspectorConnection() from DevLauncherReactUtils showing warning `Inspector connection already open, nooping.` and just returns. 5. closeInspectorConnection() from DevLauncherReactUtils executed in AsyncTask thread pool ### Case 2 with double inspector targets `http://localhost:8081/json/list` returns 6 items for bare-expo (2 + 1) x 2. 1. openInspectorConnection() from ReactInstanceManager posted task 2. closeInspectorConnection() from DevLauncherReactUtils posted task 3. openInspectorConnection() from DevLauncherReactUtils posted task 4. closeInspectorConnection() from DevLauncherReactUtils executed in AsyncTask thread pool 5. openInspectorConnection() from ReactInstanceManager executed in the AsyncTask thread pool 6. openInspectorConnection() from DevLauncherReactUtils executed in the AsyncTask thread pool that is my hypothesis, i did not confirm with logging. since it's a thread pool, so the out-of-order case may happen. # Test Plan tested on bare-expo and turning on `USE_DEV_CLIENT = true` in **MainApplication.java**
[core][dev-launcher] refactor network interceptor on android (#22693)# Why #22669 but for android > since we are going to integrate the network interceptor into expo go, this pr tries to move
[core][dev-launcher] refactor network interceptor on android (#22693)# Why #22669 but for android > since we are going to integrate the network interceptor into expo go, this pr tries to move some shared code into expo-modules-core, fixing some issues and adding unit tests. # How - move the okhttp plugin and cdp logger into expo-modules-core - introduce strong typed `CdpNetworkTypes` - fix duplicated CDP events when integrated with reanimated (we should exclude reanimated from the `sendWrappedEventToAllPages` # Test Plan - add `ExpoRequestCdpInterceptorTest` unit tests - ci passed - test network interceptor on bare-expo
[menu][Android] Rewrite safe area view using new API (#21609)
[dev-launcher] Use http:// as the default scheme to load apps (#22637)# Why When entering a URL manually, users always have to include the scheme, even when testing in their local machine (e.g.
[dev-launcher] Use http:// as the default scheme to load apps (#22637)# Why When entering a URL manually, users always have to include the scheme, even when testing in their local machine (e.g. 192.168.0.12:19000), otherwise we display an error saying that the URL is not supported. Closes ENG-7623 # How To improve the DX, we can automatically add `http://` to URLs that do not include a scheme # Test Plan Run dev-client through bare-expo on Android and iOS <table> <tr><th>iOS</th><th>Android</th></tr> <tr> <td> <video src="https://user-images.githubusercontent.com/11707729/50dbf302-948e-4013-aebb-7b4aeea5e8b5.mp4"/> </td> <td> <video src="https://github.com/expo/expo/assets/11707729/b18ba454-b2a3-4e0a-81e8-35e653ce2ca3" /> </td> </tr> </table> # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
[dev-client][android] Add support for the new architecture (#22607)# Why Closes ENG-7955 # How Implement the missing `getJSIModulePackage` methods to both `ReactNativeHost`s in order to s
[dev-client][android] Add support for the new architecture (#22607)# Why Closes ENG-7955 # How Implement the missing `getJSIModulePackage` methods to both `ReactNativeHost`s in order to support the new architecture. `ReactPackageTurboModuleManagerDelegate` was already implemented on https://github.com/expo/expo/pull/19931 # Test Plan Run `fabric-tester` and `bare-expo` apps on Android # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
[menu][Android] Start using new modules API (#21582)# Why Rewrite some menu modules to use the new API. # Test Plan - bare-expo ✅
[dev-launcher][dev-menu] fix nightlies build error 0.73.0-nightly-20230515-066f0b76d (#22503)# Why fix react-native nightlies build error (0.73.0-nightly-20230515-066f0b76d) which was caused mai
[dev-launcher][dev-menu] fix nightlies build error 0.73.0-nightly-20230515-066f0b76d (#22503)# Why fix react-native nightlies build error (0.73.0-nightly-20230515-066f0b76d) which was caused mainly by [`DevInternalSettings` updated as package-private](https://github.com/facebook/react-native/commit/1a9e444b616300666) # How - move `DevLauncherInternalSettings` and `DevMenuDevSettings` into `com.facebook.react.devsupport` package, so that we can inherit the package-private `DevInternalSettings`. - introducing `DevLauncherInternalSettingsWrapper` and `DevMenuInternalSettingsWrapper` allows us to access the package-private `DevInternalSettings` - some misc changes i will leave in pr inline comments # Test Plan - test suite ci passed - test suite nightlies ci passed
[client] Remove vendored gesture handler (#21502)# Why Removes vendored gesture handler. Another step to support Fabric by the dev-client. > Note: To support fabric in the dev-client, we nee
[client] Remove vendored gesture handler (#21502)# Why Removes vendored gesture handler. Another step to support Fabric by the dev-client. > Note: To support fabric in the dev-client, we need to rewrite the safe area context, but that won't be difficult, because that module is pretty straightforward and we can use our API to support both renderers. # How - Removed vendored code. - Mocked functions required by react-navigation. - Disabled gesture in the stack navigator. The swipe gesture won't longer close a screen, but I think it's something that we can sacrifice. Also, most of our screens are rendered inside the bottom tab navigator. # Test Plan - bare-expo on both platforms ✅ - ensures that the stack navigator works correctly ✅
[menu] Improve bottom sheet behaviour (#21486)# Why Improves the behavior of the native bottom sheet. Closes https://github.com/expo/expo/issues/21356. # How - Started a collapse animati
[menu] Improve bottom sheet behaviour (#21486)# Why Improves the behavior of the native bottom sheet. Closes https://github.com/expo/expo/issues/21356. # How - Started a collapse animation when the menu action was pressed - Added a way for users to close or hide the menu from js - Added small padding on Android to improve user experience - Extensions can now decide if executing them should trigger collapse animation. It's set to true by default. # Test Plan - bare-expo ✅ - https://snack.expo.dev/@honeycomb-wallwisher/forlorn-soda ✅
[dev-client][splash-screen] Fix error when running with new arch mode on android (#19931)# Why when turning on new architecture mode with dev-client, there is a runtime crash: ``` java.lang.As
[dev-client][splash-screen] Fix error when running with new arch mode on android (#19931)# Why when turning on new architecture mode with dev-client, there is a runtime crash: ``` java.lang.AssertionError: TurboModules are enabled, but mTurboModuleRegistry hasn't been set. ``` fixes #19866 # How - react-native has a singleton flag `ReactFeatureFlags.useTurboModules`. even though we have the `ReactNativeHost` with old architecture mode in dev-menu and dev-launcher, [the underlying `CatalystInstanceImpl` will still fail at the check](https://github.com/facebook/react-native/blob/dac6806559c49b267ce6eb2722c9ff3b9108ead1/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java#L473-L477). the `ReactPackageTurboModuleManagerDelegate.Builder` requires some c++ code, considering we don't support new architecture mode in dev-menu and dev-launcher, this pr uses a workaround to pass the `ReactPackageTurboModuleManagerDelegate.Builder` from MainApplication. - when running on new architecture mode, there is a NPE in [`FrameLayout.onMeasure`](https://android.googlesource.com/platform/frameworks/base/+/4d07687915b39dd4c241f5d22e1f0bd02e41bff8/core/java/android/widget/FrameLayout.java#193). since splash screen view remove itself in `ViewGroup.OnHierarchyChangeListener`. the child iteration will get null from `getChildAt()`. the pr tries to remove the splash screen view from the next run loop. # Test Plan - https://github.com/evelant/test_fabric_eas_build + this pr's patch
[client][Android] Remove information about the dev-client from `AndroidManifest.xml` in release builds (#19272)# Why Closes ENG-6141. # How - Moved activities and classes which are connect
[client][Android] Remove information about the dev-client from `AndroidManifest.xml` in release builds (#19272)# Why Closes ENG-6141. # How - Moved activities and classes which are connected to them to `debug` sources. # Test Plan - bare-expo and NCL ✅ - build release configuration ✅
[expo-dev-menu] Make internal runtime undebuggable (#19269)# Why Takes advantage of https://github.com/facebook/react-native/pull/34489. It'll improve our integration with Hermes inspector - us
[expo-dev-menu] Make internal runtime undebuggable (#19269)# Why Takes advantage of https://github.com/facebook/react-native/pull/34489. It'll improve our integration with Hermes inspector - users don't have to reload their app anymore to see correct sources. # How Set `enable debugger` on internal runtimes. # Test Plan I couldn't test it properly because our basic template crashes with RN `0.70`.
[dev-client] cleanup unused native code (#18405)
[android][expo-modules-core] better android emulator detection (#18394)* [android][expo-modules-core] better android emulator detection * [android][expo-modules-code] comment re: emulator detect
[android][expo-modules-core] better android emulator detection (#18394)* [android][expo-modules-core] better android emulator detection * [android][expo-modules-code] comment re: emulator detection logic * [android] optimize emulator check Co-authored-by: Kudo Chien <[email protected]> * [android] optimize emulator check Co-authored-by: Kudo Chien <[email protected]> Co-authored-by: kbrandwijk <[email protected]> Co-authored-by: Kudo Chien <[email protected]>
[dev-launcher][ios][android] restore navigation state after opening eas update (#18189)
[dev-client] Partially fixed retrieving the React Context from the Android Flipper plugin (#18105)# Why Closes ENG-5413. # How Applied the `expo-dev-launcher` part of Kudo's proposed solut
[dev-client] Partially fixed retrieving the React Context from the Android Flipper plugin (#18105)# Why Closes ENG-5413. # How Applied the `expo-dev-launcher` part of Kudo's proposed solution - https://exponent-internal.slack.com/archives/C011V63429H/p1655385628638509. Added a new point to the troubleshooting page that describes the second part which has to be applied to the main application. # Test Plan Confirming that this workaround works ✅
[dev-launcher] add button to clear recently opened apps, update UI to… (#17633)Co-authored-by: Łukasz Kosmaty <[email protected]> Co-authored-by: Eric Samelson <[email protected].
[dev-launcher] add button to clear recently opened apps, update UI to… (#17633)Co-authored-by: Łukasz Kosmaty <[email protected]> Co-authored-by: Eric Samelson <[email protected]>
[expo-dev-launcher] fix opening published update from URL on android (#17734)
[expo-dev-launcher] getApplicationIconUri code reoder to remove warning (#17755)# Why This is generating code warning, which sometimes make it more complicated to find errors
[expo-dev-launcher] Remove unnecessary safe call (#17754)# Why This is generating warning in console, should be safe to remove or we need to add the parameter as optional String.
[dev-client] Run spotless (#17612)# Why Run `spotless` in dev-* packages
[dev-launcher][android] pass correct property for updates url to dev launcher app (#17180)
[client] Remove `DevLauncherDevMenuExtensionPackage` & fix crashes when using Hermes (#17178)# Why Closes ENG-4743. Fixies problem with the `DevLauncherDevMenuExtensionPackage` that leads to pr
[client] Remove `DevLauncherDevMenuExtensionPackage` & fix crashes when using Hermes (#17178)# Why Closes ENG-4743. Fixies problem with the `DevLauncherDevMenuExtensionPackage` that leads to problems with autolinking: Matches file location with their package. # How This PR does 3 things, which are connected. That's why it wasn't split. 1. Adds a JS factory to remove the class not found exception when loading an app. This bug was only fixed for the newest expo version. If someone's using an older SDK, he will have to add some code to the `MainApplication` class. 2. Matches file location with their package. Some file was located under the `java` directory, which was unnecessary. 3. Removes `DevLauncherDevMenuExtensionPackage` and uses the main `DevLauncher` package instead. Otherwise, that will lead to problems with the auto-linking - it will try to load that package twice because it has two different implementations - for the debug and release. # Test Plan - bare-expo ✅ - with Hermes - with JSC - without dev-client
1234