expo-dev-launcher 5.0.10 → 5.0.12

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,12 +10,21 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 5.0.12 — 2024-11-11
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 5.0.11 — 2024-11-07
18
+
19
+ _This version does not introduce any user-facing changes._
20
+
13
21
  ## 5.0.10 — 2024-11-07
14
22
 
15
23
  ### 🐛 Bug fixes
16
24
 
17
25
  - [Android] Fixed mutiple reload when pressing `r` in CLI on react-native old architecture mode. ([#32532](https://github.com/expo/expo/pull/32532) by [@kudo](https://github.com/kudo))
18
26
  - Fixed build error when `EX_DEV_CLIENT_NETWORK_INSPECTOR` is false. ([#32644](https://github.com/expo/expo/pull/32644) by [@kudo](https://github.com/kudo))
27
+ - [iOS] Fix handling deep links ([#32677](https://github.com/expo/expo/pull/32677) by [@gabrieldonadel](https://github.com/gabrieldonadel))
19
28
 
20
29
  ## 5.0.9 — 2024-11-04
21
30
 
@@ -17,7 +17,7 @@ android {
17
17
  namespace "expo.modules.devlauncher"
18
18
  defaultConfig {
19
19
  versionCode 9
20
- versionName "5.0.10"
20
+ versionName "5.0.12"
21
21
  }
22
22
 
23
23
  buildTypes {
@@ -47,7 +47,7 @@
47
47
  @interface EXDevLauncherController ()
48
48
 
49
49
  @property (nonatomic, weak) UIWindow *window;
50
- @property (nonatomic, weak) id<EXDevLauncherControllerDelegate> delegate;
50
+ @property (nonatomic, weak) ExpoDevLauncherReactDelegateHandler * delegate;
51
51
  @property (nonatomic, strong) NSDictionary *launchOptions;
52
52
  @property (nonatomic, strong) NSURL *sourceUrl;
53
53
  @property (nonatomic, assign) BOOL shouldPreferUpdatesInterfaceSourceUrl;
@@ -208,7 +208,7 @@
208
208
 
209
209
  - (NSDictionary<UIApplicationLaunchOptionsKey, NSObject*> *)getLaunchOptions;
210
210
  {
211
- NSMutableDictionary *launchOptions = [self.launchOptions mutableCopy];
211
+ NSMutableDictionary *launchOptions = [self.launchOptions ?: @{} mutableCopy];
212
212
  NSURL *deepLink = [self.pendingDeepLinkRegistry consumePendingDeepLink];
213
213
 
214
214
  if (deepLink) {
@@ -327,6 +327,8 @@
327
327
  [self _applyUserInterfaceStyle:UIUserInterfaceStyleUnspecified];
328
328
 
329
329
  [self _removeInitModuleObserver];
330
+ // Reset app react host
331
+ [self.delegate destroyReactInstance];
330
332
 
331
333
  _appDelegate.rootViewFactory = [_appDelegate createRCTRootViewFactory];
332
334
 
@@ -401,7 +403,7 @@
401
403
  self.pendingDeepLinkRegistry.pendingDeepLink = url;
402
404
 
403
405
  // cold boot -- need to initialize the dev launcher app RN app to handle the link
404
- if (![_appDelegate.rootViewFactory.bridge isValid]) {
406
+ if (_appDelegate.rootViewFactory.reactHost == nil) {
405
407
  [self navigateToLauncher];
406
408
  }
407
409
 
@@ -605,6 +607,10 @@
605
607
 
606
608
  - (BOOL)isAppRunning
607
609
  {
610
+ if([_appBridge isProxy]){
611
+ return [self.delegate isReactInstanceValid];
612
+ }
613
+
608
614
  return [_appBridge isValid];
609
615
  }
610
616
 
@@ -5,6 +5,7 @@ import EXUpdatesInterface
5
5
 
6
6
  @objc
7
7
  public class ExpoDevLauncherReactDelegateHandler: ExpoReactDelegateHandler, EXDevLauncherControllerDelegate {
8
+ private weak var rctAppDelegate: RCTAppDelegate?
8
9
  private weak var reactDelegate: ExpoReactDelegate?
9
10
  private var launchOptions: [AnyHashable: Any]?
10
11
  private var deferredRootView: EXDevLauncherDeferredRCTRootView?
@@ -36,12 +37,23 @@ public class ExpoDevLauncherReactDelegateHandler: ExpoReactDelegateHandler, EXDe
36
37
  return self.deferredRootView
37
38
  }
38
39
 
40
+ @objc
41
+ public func isReactInstanceValid() -> Bool {
42
+ return self.rctAppDelegate?.rootViewFactory.value(forKey: "reactHost") != nil
43
+ }
44
+
45
+ @objc
46
+ public func destroyReactInstance() {
47
+ self.rctAppDelegate?.rootViewFactory.setValue(nil, forKey: "reactHost")
48
+ }
49
+
39
50
  // MARK: EXDevelopmentClientControllerDelegate implementations
40
51
 
41
52
  public func devLauncherController(_ developmentClientController: EXDevLauncherController, didStartWithSuccess success: Bool) {
42
53
  guard let rctAppDelegate = (UIApplication.shared.delegate as? RCTAppDelegate) else {
43
54
  fatalError("The `UIApplication.shared.delegate` is not a `RCTAppDelegate` instance.")
44
55
  }
56
+ self.rctAppDelegate = rctAppDelegate
45
57
 
46
58
  // Reset rctAppDelegate so we can relaunch the app
47
59
  if rctAppDelegate.bridgelessEnabled() {
@@ -54,7 +66,7 @@ public class ExpoDevLauncherReactDelegateHandler: ExpoReactDelegateHandler, EXDe
54
66
  withBundleURL: developmentClientController.sourceUrl(),
55
67
  moduleName: self.rootViewModuleName,
56
68
  initialProps: self.rootViewInitialProperties,
57
- launchOptions: self.launchOptions
69
+ launchOptions: developmentClientController.getLaunchOptions()
58
70
  )
59
71
  developmentClientController.appBridge = RCTBridge.current()
60
72
  rootView.backgroundColor = self.deferredRootView?.backgroundColor ?? UIColor.white
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expo-dev-launcher",
3
3
  "title": "Expo Development Launcher",
4
- "version": "5.0.10",
4
+ "version": "5.0.12",
5
5
  "description": "Pre-release version of the Expo development launcher package for testing.",
6
6
  "main": "build/DevLauncher.js",
7
7
  "types": "build/DevLauncher.d.ts",
@@ -39,7 +39,7 @@
39
39
  "@babel/plugin-transform-export-namespace-from": "^7.23.4",
40
40
  "@react-navigation/bottom-tabs": "7.0.0",
41
41
  "@react-navigation/core": "7.0.0",
42
- "@react-navigation/native": "7.0.0",
42
+ "@react-navigation/native": "^7.0.0",
43
43
  "@react-navigation/stack": "7.0.0",
44
44
  "@testing-library/jest-native": "^4.0.4",
45
45
  "@testing-library/react-native": "^12.5.1",
@@ -66,5 +66,5 @@
66
66
  ],
67
67
  "testTimeout": 15000
68
68
  },
69
- "gitHead": "c0899e56c5be08b0142f06f05aa7bac8d6bc18b8"
69
+ "gitHead": "8f11fad6f46b878de4746b49b18599fc57b5729f"
70
70
  }