expo 54.0.10 → 55.0.0-canary-20250919-7a31b96

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.
@@ -32,7 +32,7 @@ buildscript {
32
32
  def reactNativeVersion = project.extensions.getByType(ExpoModuleExtension).reactNativeVersion
33
33
 
34
34
  group = 'host.exp.exponent'
35
- version = '54.0.10'
35
+ version = '55.0.0-canary-20250919-7a31b96'
36
36
 
37
37
  expoModule {
38
38
  // We can't prebuild the module because it depends on the generated files.
@@ -43,7 +43,7 @@ android {
43
43
  namespace "expo.core"
44
44
  defaultConfig {
45
45
  versionCode 1
46
- versionName "54.0.10"
46
+ versionName "55.0.0-canary-20250919-7a31b96"
47
47
  consumerProguardFiles("proguard-rules.pro")
48
48
  }
49
49
  testOptions {
@@ -1,8 +1,8 @@
1
1
  {
2
- "@expo/fingerprint": "~0.15.1",
3
- "@expo/metro-runtime": "~6.1.2",
2
+ "@expo/fingerprint": "0.15.2-canary-20250919-7a31b96",
3
+ "@expo/metro-runtime": "6.1.3-canary-20250919-7a31b96",
4
4
  "@expo/vector-icons": "^15.0.2",
5
- "@expo/ui": "~0.2.0-beta.4",
5
+ "@expo/ui": "0.2.0-canary-20250919-7a31b96",
6
6
  "@react-native-async-storage/async-storage": "2.2.0",
7
7
  "@react-native-community/datetimepicker": "8.4.4",
8
8
  "@react-native-masked-view/masked-view": "0.3.2",
@@ -12,84 +12,84 @@
12
12
  "@react-native-picker/picker": "2.11.1",
13
13
  "@react-native-segmented-control/segmented-control": "2.5.7",
14
14
  "@stripe/stripe-react-native": "0.50.3",
15
- "eslint-config-expo": "~10.0.0",
15
+ "eslint-config-expo": "10.0.1-canary-20250919-7a31b96",
16
16
  "expo-analytics-amplitude": "~11.3.0",
17
17
  "expo-app-auth": "~11.1.0",
18
18
  "expo-app-loader-provider": "~8.0.0",
19
- "expo-apple-authentication": "~8.0.7",
20
- "expo-application": "~7.0.7",
21
- "expo-asset": "~12.0.9",
22
- "expo-audio": "~1.0.13",
23
- "expo-auth-session": "~7.0.8",
24
- "expo-av": "~16.0.7",
25
- "expo-background-fetch": "~14.0.7",
26
- "expo-background-task": "~1.0.8",
27
- "expo-battery": "~10.0.7",
28
- "expo-blur": "~15.0.7",
29
- "expo-brightness": "~14.0.7",
30
- "expo-build-properties": "~1.0.9",
31
- "expo-calendar": "~15.0.7",
32
- "expo-camera": "~17.0.8",
33
- "expo-cellular": "~8.0.7",
34
- "expo-checkbox": "~5.0.7",
35
- "expo-clipboard": "~8.0.7",
36
- "expo-constants": "~18.0.9",
37
- "expo-contacts": "~15.0.8",
38
- "expo-crypto": "~15.0.7",
39
- "expo-dev-client": "~6.0.12",
40
- "expo-device": "~8.0.8",
41
- "expo-document-picker": "~14.0.7",
42
- "expo-file-system": "~19.0.15",
43
- "expo-font": "~14.0.8",
44
- "expo-gl": "~16.0.7",
45
- "expo-glass-effect": "~0.1.4",
19
+ "expo-apple-authentication": "8.0.8-canary-20250919-7a31b96",
20
+ "expo-application": "7.0.8-canary-20250919-7a31b96",
21
+ "expo-asset": "12.0.10-canary-20250919-7a31b96",
22
+ "expo-audio": "1.0.14-canary-20250919-7a31b96",
23
+ "expo-auth-session": "7.0.9-canary-20250919-7a31b96",
24
+ "expo-av": "16.0.8-canary-20250919-7a31b96",
25
+ "expo-background-fetch": "14.0.8-canary-20250919-7a31b96",
26
+ "expo-background-task": "1.1.0-canary-20250919-7a31b96",
27
+ "expo-battery": "10.0.8-canary-20250919-7a31b96",
28
+ "expo-blur": "15.0.8-canary-20250919-7a31b96",
29
+ "expo-brightness": "14.0.8-canary-20250919-7a31b96",
30
+ "expo-build-properties": "1.0.10-canary-20250919-7a31b96",
31
+ "expo-calendar": "15.0.8-canary-20250919-7a31b96",
32
+ "expo-camera": "17.0.9-canary-20250919-7a31b96",
33
+ "expo-cellular": "8.0.8-canary-20250919-7a31b96",
34
+ "expo-checkbox": "5.0.8-canary-20250919-7a31b96",
35
+ "expo-clipboard": "8.0.8-canary-20250919-7a31b96",
36
+ "expo-constants": "18.0.10-canary-20250919-7a31b96",
37
+ "expo-contacts": "15.0.9-canary-20250919-7a31b96",
38
+ "expo-crypto": "15.0.8-canary-20250919-7a31b96",
39
+ "expo-dev-client": "6.0.13-canary-20250919-7a31b96",
40
+ "expo-device": "8.1.0-canary-20250919-7a31b96",
41
+ "expo-document-picker": "14.0.8-canary-20250919-7a31b96",
42
+ "expo-file-system": "19.1.0-canary-20250919-7a31b96",
43
+ "expo-font": "14.0.9-canary-20250919-7a31b96",
44
+ "expo-gl": "16.0.8-canary-20250919-7a31b96",
45
+ "expo-glass-effect": "0.1.5-canary-20250919-7a31b96",
46
46
  "expo-google-app-auth": "~8.3.0",
47
- "expo-haptics": "~15.0.7",
48
- "expo-image": "~3.0.8",
49
- "expo-image-loader": "~6.0.0",
50
- "expo-image-manipulator": "~14.0.7",
51
- "expo-image-picker": "~17.0.8",
52
- "expo-intent-launcher": "~13.0.7",
53
- "expo-insights": "~0.10.7",
54
- "expo-keep-awake": "~15.0.7",
55
- "expo-linear-gradient": "~15.0.7",
56
- "expo-linking": "~8.0.8",
57
- "expo-local-authentication": "~17.0.7",
58
- "expo-localization": "~17.0.7",
59
- "expo-location": "~19.0.7",
60
- "expo-mail-composer": "~15.0.7",
61
- "expo-manifests": "~1.0.8",
62
- "expo-maps": "~0.12.7",
63
- "expo-media-library": "~18.2.0",
64
- "expo-mesh-gradient": "~0.4.7",
65
- "expo-module-template": "~11.0.14",
66
- "expo-modules-core": "~3.0.18",
67
- "expo-navigation-bar": "~5.0.8",
68
- "expo-network": "~8.0.7",
69
- "expo-notifications": "~0.32.11",
70
- "expo-print": "~15.0.7",
71
- "expo-live-photo": "~1.0.7",
72
- "expo-router": "~6.0.8",
73
- "expo-screen-capture": "~8.0.8",
74
- "expo-screen-orientation": "~9.0.7",
75
- "expo-secure-store": "~15.0.7",
76
- "expo-sensors": "~15.0.7",
77
- "expo-sharing": "~14.0.7",
78
- "expo-sms": "~14.0.7",
79
- "expo-speech": "~14.0.7",
80
- "expo-splash-screen": "~31.0.10",
81
- "expo-sqlite": "~16.0.8",
82
- "expo-status-bar": "~3.0.8",
83
- "expo-store-review": "~9.0.7",
84
- "expo-symbols": "~1.0.7",
85
- "expo-system-ui": "~6.0.7",
86
- "expo-task-manager": "~14.0.7",
87
- "expo-tracking-transparency": "~6.0.7",
88
- "expo-updates": "~29.0.11",
89
- "expo-video-thumbnails": "~10.0.7",
90
- "expo-video": "~3.0.11",
91
- "expo-web-browser": "~15.0.7",
92
- "jest-expo": "~54.0.12",
47
+ "expo-haptics": "15.0.8-canary-20250919-7a31b96",
48
+ "expo-image": "3.1.0-canary-20250919-7a31b96",
49
+ "expo-image-loader": "6.0.1-canary-20250919-7a31b96",
50
+ "expo-image-manipulator": "14.0.8-canary-20250919-7a31b96",
51
+ "expo-image-picker": "17.0.9-canary-20250919-7a31b96",
52
+ "expo-intent-launcher": "13.0.8-canary-20250919-7a31b96",
53
+ "expo-insights": "0.10.8-canary-20250919-7a31b96",
54
+ "expo-keep-awake": "15.0.8-canary-20250919-7a31b96",
55
+ "expo-linear-gradient": "15.0.8-canary-20250919-7a31b96",
56
+ "expo-linking": "8.0.9-canary-20250919-7a31b96",
57
+ "expo-local-authentication": "17.0.8-canary-20250919-7a31b96",
58
+ "expo-localization": "17.0.8-canary-20250919-7a31b96",
59
+ "expo-location": "19.0.8-canary-20250919-7a31b96",
60
+ "expo-mail-composer": "15.0.8-canary-20250919-7a31b96",
61
+ "expo-manifests": "1.0.9-canary-20250919-7a31b96",
62
+ "expo-maps": "0.12.8-canary-20250919-7a31b96",
63
+ "expo-media-library": "18.3.0-canary-20250919-7a31b96",
64
+ "expo-mesh-gradient": "0.4.8-canary-20250919-7a31b96",
65
+ "expo-module-template": "11.0.14-canary-20250919-7a31b96",
66
+ "expo-modules-core": "3.0.18-canary-20250919-7a31b96",
67
+ "expo-navigation-bar": "5.0.9-canary-20250919-7a31b96",
68
+ "expo-network": "8.0.8-canary-20250919-7a31b96",
69
+ "expo-notifications": "0.32.12-canary-20250919-7a31b96",
70
+ "expo-print": "15.0.8-canary-20250919-7a31b96",
71
+ "expo-live-photo": "1.0.8-canary-20250919-7a31b96",
72
+ "expo-router": "6.0.8-canary-20250919-7a31b96",
73
+ "expo-screen-capture": "8.0.9-canary-20250919-7a31b96",
74
+ "expo-screen-orientation": "9.0.8-canary-20250919-7a31b96",
75
+ "expo-secure-store": "15.0.8-canary-20250919-7a31b96",
76
+ "expo-sensors": "15.0.8-canary-20250919-7a31b96",
77
+ "expo-sharing": "14.0.8-canary-20250919-7a31b96",
78
+ "expo-sms": "14.0.8-canary-20250919-7a31b96",
79
+ "expo-speech": "14.0.8-canary-20250919-7a31b96",
80
+ "expo-splash-screen": "31.0.11-canary-20250919-7a31b96",
81
+ "expo-sqlite": "16.0.9-canary-20250919-7a31b96",
82
+ "expo-status-bar": "3.0.9-canary-20250919-7a31b96",
83
+ "expo-store-review": "9.0.8-canary-20250919-7a31b96",
84
+ "expo-symbols": "1.0.8-canary-20250919-7a31b96",
85
+ "expo-system-ui": "6.0.8-canary-20250919-7a31b96",
86
+ "expo-task-manager": "14.0.8-canary-20250919-7a31b96",
87
+ "expo-tracking-transparency": "6.0.8-canary-20250919-7a31b96",
88
+ "expo-updates": "29.1.0-canary-20250919-7a31b96",
89
+ "expo-video-thumbnails": "10.0.8-canary-20250919-7a31b96",
90
+ "expo-video": "3.0.12-canary-20250919-7a31b96",
91
+ "expo-web-browser": "15.0.8-canary-20250919-7a31b96",
92
+ "jest-expo": "55.0.0-canary-20250919-7a31b96",
93
93
  "lottie-react-native": "~7.3.1",
94
94
  "react": "19.1.0",
95
95
  "react-dom": "19.1.0",
@@ -108,7 +108,7 @@
108
108
  "react-native-view-shot": "4.0.3",
109
109
  "react-native-webview": "13.15.0",
110
110
  "sentry-expo": "~7.0.0",
111
- "unimodules-app-loader": "~6.0.7",
111
+ "unimodules-app-loader": "6.0.8-canary-20250919-7a31b96",
112
112
  "unimodules-image-loader-interface": "~6.1.0",
113
113
  "@shopify/react-native-skia": "2.2.12",
114
114
  "@shopify/flash-list": "2.0.2",
@@ -15,7 +15,7 @@ NS_SWIFT_NAME(ExpoReactRootViewFactory)
15
15
  @property (nonatomic, weak, nullable) EXReactDelegate *reactDelegate;
16
16
 
17
17
  /**
18
- Initializer for EXAppDelegateWrapper integration
18
+ Initializer for ExpoReactNativeFactory integration
19
19
  */
20
20
  - (instancetype)initWithReactDelegate:(nullable EXReactDelegate *)reactDelegate
21
21
  configuration:(RCTRootViewFactoryConfiguration *)configuration
@@ -4,68 +4,13 @@ import ExpoModulesCore
4
4
  import ReactAppDependencyProvider
5
5
 
6
6
  /**
7
- Note: you cannot subclass Swift from Objective-C, use EXAppDelegateWrapper with Obj-C app delegates
8
7
  Allows classes extending `ExpoAppDelegateSubscriber` to hook into project's app delegate
9
8
  by forwarding `UIApplicationDelegate` events to the subscribers.
10
9
 
11
10
  Keep functions and markers in sync with https://developer.apple.com/documentation/uikit/uiapplicationdelegate
12
11
  */
13
12
  @objc(EXExpoAppDelegate)
14
- open class ExpoAppDelegate: NSObject, @preconcurrency ReactNativeFactoryProvider, UIApplicationDelegate {
15
- @objc public var factory: RCTReactNativeFactory?
16
- private let defaultModuleName = "main"
17
- private let defaultInitialProps = [AnyHashable: Any]()
18
-
19
- public func bindReactNativeFactory(_ factory: RCTReactNativeFactory) {
20
- self.factory = factory
21
- }
22
-
23
- public func recreateRootView(
24
- withBundleURL: URL?,
25
- moduleName: String?,
26
- initialProps: [AnyHashable: Any]?,
27
- launchOptions: [AnyHashable: Any]?
28
- ) -> UIView {
29
- guard let delegate = self.factory?.delegate,
30
- let rootViewFactory = self.factory?.rootViewFactory else {
31
- fatalError("recreateRootView: Missing factory in ExpoAppDelegate")
32
- }
33
-
34
- if delegate.newArchEnabled() {
35
- // chrfalch: rootViewFactory.reactHost is not available here in swift due to the underlying RCTHost type of the property. (todo: check)
36
- assert(rootViewFactory.value(forKey: "reactHost") == nil, "recreateRootViewWithBundleURL: does not support when react instance is created")
37
- } else {
38
- assert(rootViewFactory.bridge == nil, "recreateRootViewWithBundleURL: does not support when react instance is created")
39
- }
40
-
41
- let configuration = rootViewFactory.value(forKey: "_configuration") as? RCTRootViewFactoryConfiguration
42
-
43
- if let bundleURL = withBundleURL {
44
- configuration?.bundleURLBlock = {
45
- return bundleURL
46
- }
47
- }
48
-
49
- let rootView: UIView
50
- if let factory = rootViewFactory as? ExpoReactRootViewFactory {
51
- // When calling `recreateRootViewWithBundleURL:` from `EXReactRootViewFactory`,
52
- // we don't want to loop the ReactDelegate again. Otherwise, it will be an infinite loop.
53
- rootView = factory.superView(
54
- withModuleName: moduleName ?? defaultModuleName,
55
- initialProperties: initialProps,
56
- launchOptions: launchOptions ?? [:]
57
- )
58
- } else {
59
- rootView = rootViewFactory.view(
60
- withModuleName: moduleName ?? defaultModuleName,
61
- initialProperties: initialProps,
62
- launchOptions: launchOptions
63
- )
64
- }
65
-
66
- return rootView
67
- }
68
-
13
+ open class ExpoAppDelegate: NSObject, UIApplicationDelegate {
69
14
  // MARK: - Initializing the App
70
15
  #if os(iOS) || os(tvOS)
71
16
 
@@ -2,8 +2,14 @@
2
2
 
3
3
  import React
4
4
 
5
- @MainActor public class ExpoReactNativeFactory: RCTReactNativeFactory {
6
- private let reactDelegate = ExpoReactDelegate(handlers: ExpoAppDelegateSubscriberRepository.reactDelegateHandlers)
5
+ public class ExpoReactNativeFactory: RCTReactNativeFactory, ExpoReactNativeFactoryProtocol {
6
+ private let defaultModuleName = "main"
7
+ private lazy var reactDelegate: ExpoReactDelegate = {
8
+ ExpoReactDelegate(
9
+ handlers: ExpoAppDelegateSubscriberRepository.reactDelegateHandlers,
10
+ reactNativeFactory: self
11
+ )
12
+ }()
7
13
 
8
14
  // TODO: Remove check when react-native-macos 0.81 is released
9
15
  #if !os(macOS)
@@ -21,6 +27,7 @@ import React
21
27
  }
22
28
  #endif
23
29
 
30
+ @MainActor
24
31
  @objc func createRCTRootViewFactory() -> RCTRootViewFactory {
25
32
  // Alan: This is temporary. We need to cast to ExpoReactNativeFactoryDelegate here because currently, if you extend RCTReactNativeFactory
26
33
  // from Swift, customizeRootView will not work on the new arch because the cast to RCTRootView will never
@@ -83,4 +90,49 @@ import React
83
90
  turboModuleManagerDelegate: self
84
91
  )
85
92
  }
93
+
94
+ public func recreateRootView(
95
+ withBundleURL: URL?,
96
+ moduleName: String?,
97
+ initialProps: [AnyHashable: Any]?,
98
+ launchOptions: [AnyHashable: Any]?
99
+ ) -> UIView {
100
+ guard let delegate = self.delegate else {
101
+ fatalError("recreateRootView: Missing RCTReactNativeFactoryDelegate")
102
+ }
103
+
104
+ if RCTIsNewArchEnabled() {
105
+ // chrfalch: rootViewFactory.reactHost is not available here in swift due to the underlying RCTHost type of the property. (todo: check)
106
+ assert(self.rootViewFactory.value(forKey: "reactHost") == nil, "recreateRootViewWithBundleURL: does not support when react instance is created")
107
+ } else {
108
+ assert(self.rootViewFactory.bridge == nil, "recreateRootViewWithBundleURL: does not support when react instance is created")
109
+ }
110
+
111
+ let configuration = self.rootViewFactory.value(forKey: "_configuration") as? RCTRootViewFactoryConfiguration
112
+
113
+ if let bundleURL = withBundleURL {
114
+ configuration?.bundleURLBlock = {
115
+ return bundleURL
116
+ }
117
+ }
118
+
119
+ let rootView: UIView
120
+ if let factory = self.rootViewFactory as? ExpoReactRootViewFactory {
121
+ // When calling `recreateRootViewWithBundleURL:` from `EXReactRootViewFactory`,
122
+ // we don't want to loop the ReactDelegate again. Otherwise, it will be an infinite loop.
123
+ rootView = factory.superView(
124
+ withModuleName: moduleName ?? defaultModuleName,
125
+ initialProperties: initialProps,
126
+ launchOptions: launchOptions ?? [:]
127
+ )
128
+ } else {
129
+ rootView = rootViewFactory.view(
130
+ withModuleName: moduleName ?? defaultModuleName,
131
+ initialProperties: initialProps,
132
+ launchOptions: launchOptions
133
+ )
134
+ }
135
+
136
+ return rootView
137
+ }
86
138
  }
package/ios/Expo.h CHANGED
@@ -1,3 +1,3 @@
1
1
  #import <ExpoModulesCore/ExpoModulesCore.h>
2
2
  #import <Expo/EXAppDefinesLoader.h>
3
- #import <Expo/EXAppDelegateWrapper.h>
3
+ #import <Expo/RCTAppDelegateUmbrella.h>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo",
3
- "version": "54.0.10",
3
+ "version": "55.0.0-canary-20250919-7a31b96",
4
4
  "description": "The Expo SDK",
5
5
  "main": "src/Expo.ts",
6
6
  "module": "src/Expo.ts",
@@ -75,23 +75,23 @@
75
75
  "homepage": "https://github.com/expo/expo/tree/main/packages/expo",
76
76
  "dependencies": {
77
77
  "@babel/runtime": "^7.20.0",
78
- "@expo/cli": "54.0.8",
79
- "@expo/config": "~12.0.9",
80
- "@expo/config-plugins": "~54.0.1",
81
- "@expo/devtools": "0.1.7",
82
- "@expo/fingerprint": "0.15.1",
78
+ "@expo/cli": "54.0.8-canary-20250919-7a31b96",
79
+ "@expo/config": "12.0.10-canary-20250919-7a31b96",
80
+ "@expo/config-plugins": "54.0.2-canary-20250919-7a31b96",
81
+ "@expo/devtools": "0.1.8-canary-20250919-7a31b96",
82
+ "@expo/fingerprint": "0.15.2-canary-20250919-7a31b96",
83
83
  "@expo/metro": "~54.0.0",
84
- "@expo/metro-config": "54.0.5",
84
+ "@expo/metro-config": "54.0.5-canary-20250919-7a31b96",
85
85
  "@expo/vector-icons": "^15.0.2",
86
86
  "@ungap/structured-clone": "^1.3.0",
87
- "babel-preset-expo": "~54.0.3",
88
- "expo-asset": "~12.0.9",
89
- "expo-constants": "~18.0.9",
90
- "expo-file-system": "~19.0.15",
91
- "expo-font": "~14.0.8",
92
- "expo-keep-awake": "~15.0.7",
93
- "expo-modules-autolinking": "3.0.13",
94
- "expo-modules-core": "3.0.18",
87
+ "babel-preset-expo": "54.0.3-canary-20250919-7a31b96",
88
+ "expo-asset": "12.0.10-canary-20250919-7a31b96",
89
+ "expo-constants": "18.0.10-canary-20250919-7a31b96",
90
+ "expo-file-system": "19.1.0-canary-20250919-7a31b96",
91
+ "expo-font": "14.0.9-canary-20250919-7a31b96",
92
+ "expo-keep-awake": "15.0.8-canary-20250919-7a31b96",
93
+ "expo-modules-autolinking": "3.1.0-canary-20250919-7a31b96",
94
+ "expo-modules-core": "3.0.18-canary-20250919-7a31b96",
95
95
  "pretty-format": "^29.7.0",
96
96
  "react-refresh": "^0.14.2",
97
97
  "whatwg-url-without-unicode": "8.0.0-3"
@@ -100,15 +100,15 @@
100
100
  "@types/node": "^22.14.0",
101
101
  "@types/react": "~19.1.10",
102
102
  "@types/react-test-renderer": "~19.1.0",
103
- "expo-module-scripts": "^5.0.7",
103
+ "expo-module-scripts": "5.0.8-canary-20250919-7a31b96",
104
104
  "react": "19.1.0",
105
105
  "react-dom": "19.1.0",
106
106
  "react-native": "0.81.4",
107
107
  "web-streams-polyfill": "^3.3.2"
108
108
  },
109
109
  "peerDependencies": {
110
- "@expo/dom-webview": "*",
111
- "@expo/metro-runtime": "*",
110
+ "@expo/dom-webview": "0.2.8-canary-20250919-7a31b96",
111
+ "@expo/metro-runtime": "6.1.3-canary-20250919-7a31b96",
112
112
  "react": "*",
113
113
  "react-native": "*",
114
114
  "react-native-webview": "*"
@@ -123,6 +123,5 @@
123
123
  "react-native-webview": {
124
124
  "optional": true
125
125
  }
126
- },
127
- "gitHead": "6523053d0d997d2a21f580d2752b2f873c122038"
126
+ }
128
127
  }
package/template.tgz CHANGED
Binary file
@@ -1,30 +0,0 @@
1
- // Copyright 2018-present 650 Industries. All rights reserved.
2
-
3
- #import <ExpoModulesCore/Platform.h>
4
- #import <ExpoModulesCore/EXReactDelegateWrapper.h>
5
- #import <Expo/RCTAppDelegateUmbrella.h>
6
-
7
- NS_ASSUME_NONNULL_BEGIN
8
-
9
- @interface RCTAppDelegate ()
10
-
11
- @end
12
-
13
- __deprecated_msg("EXAppDelegateWrapper is deprecated. Migrate your AppDelegate to Swift and use ExpoAppDelegate instead. EXAppDelegateWrapper will be removed in SDK 55.")
14
- @interface EXAppDelegateWrapper : NSObject <UIApplicationDelegate, UISceneDelegate, RCTReactNativeFactoryDelegate>
15
-
16
- @property (nonatomic, strong, readonly) EXReactDelegateWrapper *reactDelegate;
17
-
18
- @property (nonatomic, strong, nullable) NSString *moduleName;
19
- @property (nonatomic, strong, nullable) NSDictionary *initialProps;
20
-
21
- /**
22
- Currently (RN 0.76) `customizeRootView` signature in `RCTAppDelegate` is broken as it uses `RCTRootView` type,
23
- but this type is no longer used. It should rather be `RCTSurfaceHostingView`, but for simplicity it could be just `UIView`.
24
- We need a helper function in Objective-C to actually make it to work, otherwise the types will conflict in Swift.
25
- */
26
- + (void)customizeRootView:(nonnull UIView *)rootView byAppDelegate:(nonnull RCTAppDelegate *)appDelegate;
27
-
28
- @end
29
-
30
- NS_ASSUME_NONNULL_END
@@ -1,112 +0,0 @@
1
- // Copyright 2018-present 650 Industries. All rights reserved.
2
-
3
- #import <Expo/EXAppDelegateWrapper.h>
4
-
5
- #import <Expo/RCTAppDelegateUmbrella.h>
6
- #import <Expo/Swift.h>
7
-
8
- #import <React/RCTComponentViewFactory.h> // Allows non-umbrella since it's coming from React-RCTFabric
9
- #import <ReactCommon/RCTHost.h> // Allows non-umbrella because the header is not inside a clang module
10
-
11
- @implementation EXAppDelegateWrapper {
12
- EXExpoAppDelegate *_expoAppDelegate;
13
- }
14
-
15
- - (instancetype)init
16
- {
17
- if (self = [super init]) {
18
- _expoAppDelegate = [EXExpoAppDelegate new];
19
- }
20
- return self;
21
- }
22
-
23
- // This needs to be implemented, otherwise forwarding won't be called.
24
- // When the app starts, `UIApplication` uses it to check beforehand
25
- // which `UIApplicationDelegate` selectors are implemented.
26
- - (BOOL)respondsToSelector:(SEL)selector
27
- {
28
- return [super respondsToSelector:selector] || [_expoAppDelegate respondsToSelector:selector];
29
- }
30
-
31
- // Forwards all invocations to `ExpoAppDelegate` object.
32
- - (id)forwardingTargetForSelector:(SEL)selector
33
- {
34
- return _expoAppDelegate;
35
- }
36
-
37
- #pragma mark - UIApplicationDelegate
38
-
39
- // Make sure to override all necessary methods from `RCTAppDelegate` here, explicitly forwarding everything to `_expoAppDelegate`.
40
- // `forwardingTargetForSelector` works only for methods that are not specified in this and `RCTAppDelegate` classes.
41
-
42
- #if !TARGET_OS_OSX
43
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
44
- {
45
- return [_expoAppDelegate application:application didFinishLaunchingWithOptions:launchOptions];
46
- }
47
-
48
- - (void)applicationDidBecomeActive:(UIApplication *)application
49
- {
50
- return [_expoAppDelegate applicationDidBecomeActive:application];
51
- }
52
- #else
53
- - (void)applicationDidFinishLaunching:(NSNotification *)notification
54
- {
55
- return [_expoAppDelegate applicationDidFinishLaunching:notification];
56
- }
57
-
58
- - (void)applicationDidBecomeActive:(NSNotification *)notification
59
- {
60
- return [_expoAppDelegate applicationDidBecomeActive:notification];
61
- }
62
- #endif
63
-
64
- - (UIViewController *)createRootViewController
65
- {
66
- return [_expoAppDelegate.factory.delegate createRootViewController];
67
- }
68
-
69
- - (void)customizeRootView:(UIView *)rootView
70
- {
71
- [_expoAppDelegate.factory.delegate customizeRootView:rootView];
72
- }
73
-
74
- #pragma mark - RCTComponentViewFactoryComponentProvider
75
-
76
- - (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
77
- {
78
- return self.dependencyProvider.thirdPartyFabricComponents;
79
- }
80
-
81
- #pragma mark - RCTHostDelegate
82
-
83
- - (void)hostDidStart:(RCTHost *)host
84
- {
85
- }
86
-
87
- - (void)host:(RCTHost *)host
88
- didReceiveJSErrorStack:(NSArray<NSDictionary<NSString *, id> *> *)stack
89
- message:(NSString *)message
90
- exceptionId:(NSUInteger)exceptionId
91
- isFatal:(BOOL)isFatal
92
- {
93
- }
94
-
95
- - (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
96
- {
97
- return [_expoAppDelegate.factory.delegate getModuleInstanceFromClass:moduleClass];
98
- }
99
-
100
- - (Class)getModuleClassFromName:(const char *)name {
101
- return [_expoAppDelegate.factory.delegate getModuleClassFromName:name];
102
- }
103
-
104
-
105
- #pragma mark - Helpers
106
-
107
- + (void)customizeRootView:(nonnull UIView *)rootView byAppDelegate:(nonnull RCTAppDelegate *)appDelegate
108
- {
109
- [appDelegate customizeRootView:(RCTRootView *)rootView];
110
- }
111
-
112
- @end