diff --git a/React/Base/RCTJavaScriptLoader.m b/React/Base/RCTJavaScriptLoader.m index baf2ca34455476..b607561357808c 100755 --- a/React/Base/RCTJavaScriptLoader.m +++ b/React/Base/RCTJavaScriptLoader.m @@ -64,7 +64,8 @@ - (void)loadBundleAtURL:(NSURL *)scriptURL onComplete:(void (^)(NSError *))onCom if ([scriptURL isFileURL]) { NSString *bundlePath = [[NSBundle bundleForClass:[self class]] resourcePath]; - NSString *localPath = [scriptURL.absoluteString substringFromIndex:@"file://".length]; + NSString *decodedPath = [scriptURL.absoluteString stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + NSString *localPath = [decodedPath substringFromIndex:@"file://".length]; if (![localPath hasPrefix:bundlePath]) { NSString *absolutePath = [NSString stringWithFormat:@"%@/%@", bundlePath, localPath];