fix: update debug JSBundle name & rootView component

This commit is contained in:
Sunbreak 2023-03-10 10:15:02 +08:00
parent 437a043427
commit 9baa1391ca

View File

@ -44,7 +44,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
#endif
NSDictionary *initProps = [self prepareInitialProps];
UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"videoplayer", initProps);
UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"VideoPlayer", initProps);
if (@available(iOS 13.0, *)) {
rootView.backgroundColor = [UIColor systemBackgroundColor];
@ -85,7 +85,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"src/index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif