diff --git a/React/Base/RCTJavaScriptLoader.h b/React/Base/RCTJavaScriptLoader.h index f98a7bdd272..141649556af 100755 --- a/React/Base/RCTJavaScriptLoader.h +++ b/React/Base/RCTJavaScriptLoader.h @@ -32,14 +32,13 @@ typedef void (^RCTSourceLoadBlock)(NSError *error, NSData *source, int64_t sourc /** * @experimental * Attempts to synchronously load the script at the given URL. The following two conditions must be met: - * 1. It must be a file URL. - * 2. It must point to a RAM bundle, or allowLoadingNonRAMBundles must be YES. + * 1. It must be a file URL. + * 2. It must point to a RAM bundle. * If the URL does not meet those conditions, this method will return nil and supply an error with the domain * RCTJavaScriptLoaderErrorDomain and the code RCTJavaScriptLoaderErrorCannotBeLoadedSynchronously. */ + (NSData *)attemptSynchronousLoadOfBundleAtURL:(NSURL *)scriptURL sourceLength:(int64_t *)sourceLength - allowLoadingNonRAMBundles:(BOOL)allowLoadingNonRAMBundles error:(NSError **)error; @end diff --git a/React/Base/RCTJavaScriptLoader.m b/React/Base/RCTJavaScriptLoader.m index 9a7edca869a..f07b9adaead 100755 --- a/React/Base/RCTJavaScriptLoader.m +++ b/React/Base/RCTJavaScriptLoader.m @@ -31,7 +31,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init) NSError *error; NSData *data = [self attemptSynchronousLoadOfBundleAtURL:scriptURL sourceLength:&sourceLength - allowLoadingNonRAMBundles:NO // we'll do it async error:&error]; if (data) { onComplete(nil, data, sourceLength); @@ -51,7 +50,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init) + (NSData *)attemptSynchronousLoadOfBundleAtURL:(NSURL *)scriptURL sourceLength:(int64_t *)sourceLength - allowLoadingNonRAMBundles:(BOOL)allowLoadingNonRAMBundles error:(NSError **)error { NSString *unsanitizedScriptURLString = scriptURL.absoluteString; @@ -111,16 +109,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init) magicNumber = NSSwapLittleIntToHost(magicNumber); if (magicNumber != RCTRAMBundleMagicNumber) { - if (allowLoadingNonRAMBundles) { - NSData *source = [NSData dataWithContentsOfFile:scriptURL.path - options:NSDataReadingMappedIfSafe - error:error]; - if (sourceLength && source != nil) { - *sourceLength = source.length; - } - return source; - } - if (error) { *error = [NSError errorWithDomain:RCTJavaScriptLoaderErrorDomain code:RCTJavaScriptLoaderErrorCannotBeLoadedSynchronously