Skip to content

Commit

Permalink
Add BUCK configuration for RNTester-iOS (#39757)
Browse files Browse the repository at this point in the history
Summary:

Changelog: [Internal]

Differential Revision: D49817124
  • Loading branch information
christophpurrer authored and facebook-github-bot committed Oct 4, 2023
1 parent 353d8d3 commit 59b995e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>

@class RCTBridge;
Expand Down
10 changes: 8 additions & 2 deletions packages/rn-tester/RNTester/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
#import <RNTMyNativeViewComponentView.h>
#endif

#if BUNDLE_PATH
NSString *kBundlePath = @"xplat/js/RKJSModules/EntryPoints/RNTesterTestBundle.js";
#else
NSString *kBundlePath = @"js/RNTesterApp.ios";
#endif

@implementation AppDelegate

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

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"js/RNTesterApp.ios"];
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:kBundlePath];
}

- (BOOL)application:(UIApplication *)app
Expand Down Expand Up @@ -126,7 +132,7 @@ - (void)application:(__unused UIApplication *)application

- (NSURL *)getBundleURL
{
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"js/RNTesterApp.ios"];
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:kBundlePath];
}
#endif

Expand Down

0 comments on commit 59b995e

Please sign in to comment.