Skip to content

Commit e1d824f

Browse files
Add BUCK configuration for RNTester-iOS (#39757)
Summary: Pull Request resolved: #39757 Changelog: [Internal] Reviewed By: fkgozali Differential Revision: D49817124 fbshipit-source-id: cccbdb324ca5ecc1795189a7c07cfed6aa220020
1 parent ea72bb2 commit e1d824f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Diff for: packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
#import <React/RCTBridgeDelegate.h>
89
#import <UIKit/UIKit.h>
910

1011
@class RCTBridge;

Diff for: packages/rn-tester/RNTester/AppDelegate.mm

+8-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
#import <RNTMyNativeViewComponentView.h>
2222
#endif
2323

24+
#if BUNDLE_PATH
25+
NSString *kBundlePath = @"xplat/js/RKJSModules/EntryPoints/RNTesterTestBundle.js";
26+
#else
27+
NSString *kBundlePath = @"js/RNTesterApp.ios";
28+
#endif
29+
2430
@implementation AppDelegate
2531

2632
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
@@ -47,7 +53,7 @@ - (NSDictionary *)prepareInitialProps
4753

4854
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
4955
{
50-
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"js/RNTesterApp.ios"];
56+
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:kBundlePath];
5157
}
5258

5359
- (BOOL)application:(UIApplication *)app
@@ -126,7 +132,7 @@ - (void)application:(__unused UIApplication *)application
126132

127133
- (NSURL *)getBundleURL
128134
{
129-
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"js/RNTesterApp.ios"];
135+
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:kBundlePath];
130136
}
131137
#endif
132138

0 commit comments

Comments
 (0)