Skip to content

Commit

Permalink
[dev-menu][iOS] Fix reloading app through "r" hotkey (#28617)
Browse files Browse the repository at this point in the history
# Why

Closes ENG-12058

Similar to the issue reported by @Kudo on core
(facebook/react-native#44241), triggering two
immediate reloads when running an app using the new arch in bridgeless
mode will cause the app to crash on iOS as well.

# How

Instead of registering the "r" hotkey for the DevMenu `reloadAction` we
can just rely on the default react-native reload action (which also uses
the "r" hotkey)

# Test Plan

Test dev-client through BareExpo and FabricTester

# 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).
  • Loading branch information
gabrieldonadel committed May 4, 2024
1 parent 491938a commit d294dd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/expo-dev-menu/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### 🐛 Bug fixes

- Fix reloading app through "r" hotkey on iOS. ([#28617](https://github.com/expo/expo/pull/28617) by [@gabrieldonadel](https://github.com/gabrieldonadel))

### 💡 Others

## 5.0.11 — 2024-05-03
Expand Down
1 change: 0 additions & 1 deletion packages/expo-dev-menu/ios/Modules/DevMenuExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ open class DevMenuExtensions: NSObject, DevMenuExtensionProtocol {
reload.label = { "Reload" }
reload.glyphName = { "reload" }
reload.importance = DevMenuScreenItem.ImportanceHighest
reload.registerKeyCommand(input: "r", modifiers: []) // "r" without modifiers
return reload
}

Expand Down

0 comments on commit d294dd4

Please sign in to comment.