Skip to content

Commit 6d3ccca

Browse files
authored
[iOS] Pass the RCTAppDependencyProvider to the RCTAppDelegate (#83)
1 parent 9b6a6af commit 6d3ccca

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

template/ios/HelloWorld/AppDelegate.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
import UIKit
22
import React
33
import React_RCTAppDelegate
4+
import ReactCodegen
45

56
@main
67
class AppDelegate: RCTAppDelegate {
78
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
89
self.moduleName = "HelloWorld"
9-
10+
self.dependencyProvider = RCTAppDependencyProvider()
11+
1012
// You can add your custom initial props in the dictionary below.
1113
// They will be passed down to the ViewController used by React Native.
1214
self.initialProps = [:]
13-
15+
1416
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
1517
}
16-
18+
1719
override func sourceURL(for bridge: RCTBridge) -> URL? {
1820
self.bundleURL()
1921
}
20-
22+
2123
override func bundleURL() -> URL? {
2224
#if DEBUG
2325
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")

0 commit comments

Comments
 (0)