File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ internal import ReactAppDependencyProvider
66class ReactNativeBrownfieldDelegate : RCTDefaultReactNativeFactoryDelegate {
77 var entryFile = " index "
88 var bundlePath = " main.jsbundle "
9+ var bundle = Bundle . main
910 // MARK: - RCTReactNativeFactoryDelegate Methods
1011
1112 override func sourceURL( for bridge: RCTBridge ) -> URL ? {
@@ -21,7 +22,7 @@ class ReactNativeBrownfieldDelegate: RCTDefaultReactNativeFactoryDelegate {
2122 let resourceName = withoutLast. joined ( )
2223 let fileExtension = resourceURLComponents. last ?? " "
2324
24- return Bundle . main . url ( forResource: resourceName, withExtension: fileExtension)
25+ return bundle . url ( forResource: resourceName, withExtension: fileExtension)
2526#endif
2627 }
2728}
@@ -54,6 +55,15 @@ class ReactNativeBrownfieldDelegate: RCTDefaultReactNativeFactoryDelegate {
5455 delegate. bundlePath = bundlePath
5556 }
5657 }
58+ /**
59+ * Bundle instance to lookup the JavaScript bundle.
60+ * Default value: Bundle.main
61+ */
62+ @objc public var bundle : Bundle = Bundle . main {
63+ didSet {
64+ delegate. bundle = bundle
65+ }
66+ }
5767 /**
5868 * React Native factory instance created when starting React Native.
5969 * Default value: nil
You can’t perform that action at this time.
0 commit comments