expo-targets 1.8.1 → 1.8.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-targets",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "Expo config plugin for Apple targets and Android app extensions",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",
@@ -179,19 +179,23 @@ class ReactNativeViewController: UIViewController {
179
179
  private func setupReactNativeView(with sharedData: [String: Any]?) {
180
180
  // Create delegate with target-specific bundle root
181
181
  let delegate = ExtensionReactDelegate(bundleRoot: "{{BUNDLE_ROOT}}")
182
+ reactNativeFactoryDelegate = delegate
183
+ reactNativeFactoryDelegate!.dependencyProvider = RCTAppDependencyProvider()
184
+
185
+ // Factory must exist before any RCTBundleURLProvider / bundleURL() call.
186
+ // Those read RN feature flags; ExpoReactNativeFactory.init overrides them.
187
+ // Reading first aborts in ReactNativeFeatureFlagsAccessor::ensureFlagsNotAccessed.
188
+ reactNativeFactory = ExpoReactNativeFactory(delegate: reactNativeFactoryDelegate!)
189
+
182
190
  guard delegate.bundleURL() != nil else {
183
191
  showError(
184
192
  "Could not load the JavaScript bundle. Start Metro with `npx expo start` for live reload, or rebuild with an embedded bundle (Release / no packager)."
185
193
  )
194
+ reactNativeFactory = nil
195
+ reactNativeFactoryDelegate = nil
186
196
  return
187
197
  }
188
198
 
189
- reactNativeFactoryDelegate = delegate
190
- reactNativeFactoryDelegate!.dependencyProvider = RCTAppDependencyProvider()
191
-
192
- // Create factory via Expo (pulls RCTAppDelegate APIs through Expo.h)
193
- reactNativeFactory = ExpoReactNativeFactory(delegate: reactNativeFactoryDelegate!)
194
-
195
199
  // Capture current view properties
196
200
  let currentBounds = self.view.bounds
197
201
  let currentScale = UIScreen.main.scale