Migrate RedBox to RCTBundleManager

Summary:
See title.

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D28192003

fbshipit-source-id: a1a21782b51f327b9b92c60c7e9bd7251fcdebf0
This commit is contained in:
Ramanpreet Nara 2021-05-04 18:31:35 -07:00 коммит произвёл Facebook GitHub Bot
Родитель adaa1c98f6
Коммит 1f105e6f16
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -450,6 +450,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder)
@synthesize bridge = _bridge;
@synthesize moduleRegistry = _moduleRegistry;
@synthesize bundleManager = _bundleManager;
RCT_EXPORT_MODULE()
@ -636,7 +637,7 @@ RCT_EXPORT_METHOD(dismiss)
- (void)redBoxWindow:(__unused RCTRedBoxWindow *)redBoxWindow openStackFrameInEditor:(RCTJSStackFrame *)stackFrame
{
NSURL *const bundleURL = _overrideBundleURL ?: _bridge.bundleURL;
NSURL *const bundleURL = _overrideBundleURL ?: _bundleManager.bundleURL;
if (![bundleURL.scheme hasPrefix:@"http"]) {
RCTLogWarn(@"Cannot open stack frame in editor because you're not connected to the packager.");
return;