Skip to content

Commit

Permalink
[iOS] Pass the RCTAppDependencyProvider to the RCTAppDelegate (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipolleschi authored Nov 18, 2024
1 parent 9b6a6af commit 6d3ccca
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions template/ios/HelloWorld/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
import UIKit
import React
import React_RCTAppDelegate
import ReactCodegen

@main
class AppDelegate: RCTAppDelegate {
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
self.moduleName = "HelloWorld"

self.dependencyProvider = RCTAppDependencyProvider()

// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.
self.initialProps = [:]

return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

override func sourceURL(for bridge: RCTBridge) -> URL? {
self.bundleURL()
}

override func bundleURL() -> URL? {
#if DEBUG
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
Expand Down

0 comments on commit 6d3ccca

Please # to comment.