expo-dev-menu 7.0.15 → 7.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 7.0.16 — 2025-11-05
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - [iOS] Fix broken hotkeys after reload. ([#40829](https://github.com/expo/expo/pull/40829) by [@alanjhughes](https://github.com/alanjhughes))
18
+
13
19
  ## 7.0.15 — 2025-10-21
14
20
 
15
21
  _This version does not introduce any user-facing changes._
@@ -12,7 +12,7 @@ apply plugin: 'expo-module-gradle-plugin'
12
12
  apply plugin: 'org.jetbrains.kotlin.plugin.compose'
13
13
 
14
14
  group = 'host.exp.exponent'
15
- version = '7.0.15'
15
+ version = '7.0.16'
16
16
 
17
17
  expoModule {
18
18
  canBePublished false
@@ -22,7 +22,7 @@ android {
22
22
  namespace "expo.modules.devmenu"
23
23
  defaultConfig {
24
24
  versionCode 10
25
- versionName '7.0.15'
25
+ versionName '7.0.16'
26
26
  }
27
27
  buildFeatures {
28
28
  compose true
@@ -20,7 +20,11 @@ class DevMenuKeyCommandsInterceptor {
20
20
  }
21
21
  }
22
22
 
23
+ static private var moduleObserver: NSObjectProtocol?
24
+
23
25
  static private func registerKeyCommands() {
26
+ addModuleObserver()
27
+
24
28
  guard let commands = RCTKeyCommands.sharedInstance() else {
25
29
  return
26
30
  }
@@ -37,6 +41,14 @@ class DevMenuKeyCommandsInterceptor {
37
41
  action: { _ in DevMenuManager.shared.toggleMenu() }
38
42
  )
39
43
 
44
+ commands.registerKeyCommand(
45
+ withInput: "r",
46
+ modifierFlags: .command,
47
+ action: { _ in
48
+ DevMenuManager.shared.reload()
49
+ }
50
+ )
51
+
40
52
  commands.registerKeyCommand(
41
53
  withInput: "r",
42
54
  modifierFlags: [],
@@ -70,7 +82,45 @@ class DevMenuKeyCommandsInterceptor {
70
82
  commands.unregisterKeyCommand(withInput: "d", modifierFlags: .command)
71
83
  commands.unregisterKeyCommand(withInput: "d", modifierFlags: .control)
72
84
  commands.unregisterKeyCommand(withInput: "r", modifierFlags: [])
85
+ commands.unregisterKeyCommand(withInput: "r", modifierFlags: .command)
73
86
  commands.unregisterKeyCommand(withInput: "i", modifierFlags: .command)
74
87
  commands.unregisterKeyCommand(withInput: "p", modifierFlags: .command)
88
+
89
+ removeModuleObserver()
90
+ }
91
+
92
+ static private func refreshKeyCommands() {
93
+ guard isInstalled else {
94
+ return
95
+ }
96
+
97
+ RCTExecuteOnMainQueue {
98
+ unregisterKeyCommands()
99
+ registerKeyCommands()
100
+ }
101
+ }
102
+
103
+ static private func addModuleObserver() {
104
+ guard moduleObserver == nil else {
105
+ return
106
+ }
107
+
108
+ moduleObserver = NotificationCenter.default.addObserver(
109
+ forName: NSNotification.Name.RCTDidInitializeModule,
110
+ object: nil,
111
+ queue: .main
112
+ ) { notification in
113
+ if (notification.userInfo?["module"] as? RCTDevMenu) != nil {
114
+ refreshKeyCommands()
115
+ }
116
+ }
117
+ }
118
+
119
+ static private func removeModuleObserver() {
120
+ let center = NotificationCenter.default
121
+ if let moduleObserver {
122
+ center.removeObserver(moduleObserver)
123
+ self.moduleObserver = nil
124
+ }
75
125
  }
76
126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-dev-menu",
3
- "version": "7.0.15",
3
+ "version": "7.0.16",
4
4
  "description": "Expo/React Native module with the developer menu.",
5
5
  "main": "build/DevMenu.js",
6
6
  "types": "build/DevMenu.d.ts",
@@ -52,5 +52,5 @@
52
52
  "peerDependencies": {
53
53
  "expo": "*"
54
54
  },
55
- "gitHead": "282a1aa24f576ebbcb4bdc417a27c278156e69e0"
55
+ "gitHead": "c78d97bb440547ad05de38f37398e79a7118c52a"
56
56
  }