vxrn 2.9.1 → 2.10.0

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.
@@ -140,7 +140,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
140
140
  ) -> Bool {
141
141
  let delegate = ReactNativeDelegate()
142
142
  let factory = RCTReactNativeFactory(delegate: delegate)
143
- delegate.dependencyProvider = RCTAppDependencyProvider()
143
+ delegate.dependencyProvider = OneDependencyProvider()
144
144
  reactNativeDelegate = delegate
145
145
  reactNativeFactory = factory
146
146
  ${backgroundTasks ? ` OneBackgroundTasksRegisterHost(factory, launchOptions)
@@ -149,6 +149,21 @@ ${backgroundTasks ? ` OneBackgroundTasksRegisterHost(factory, launchOptions)
149
149
  }
150
150
  }
151
151
 
152
+ // react native creates these modules on the main queue while the instance
153
+ // initializes. left lazy, the first js access blocks the js thread on a
154
+ // synchronous main queue hop that waits behind the app's own launch work.
155
+ class OneDependencyProvider: RCTAppDependencyProvider {
156
+ override func unstableModulesRequiringMainQueueSetup() -> [String] {
157
+ super.unstableModulesRequiringMainQueueSetup() + [
158
+ "PlatformConstants",
159
+ "DeviceInfo",
160
+ "AccessibilityManager",
161
+ "Appearance",
162
+ "OneNativeSafeAreaContext",
163
+ ]
164
+ }
165
+ }
166
+
152
167
  class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
153
168
  override func bundleURL() -> URL? {
154
169
  #if DEBUG