fix(iOS): use RCTConvert to convert allowingReadAccessToURL. (#845)

* fix(ios):use RCTConvert to convert url instead of using URLWithStringg

* fix(iOS):remove stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding, because it's deprecated in iOS 9
This commit is contained in:
hank121314 2019-09-05 21:13:33 +08:00 committed by Thibault Malbranche
parent 9ed05b2d1d
commit c366fdf2e7
1 changed files with 1 additions and 1 deletions

View File

@ -438,7 +438,7 @@ static NSURLCredential* clientAuthenticationCredential;
[_webView loadRequest:request];
}
else {
NSURL* readAccessUrl = _allowingReadAccessToURL ? [NSURL URLWithString:_allowingReadAccessToURL] : request.URL;
NSURL* readAccessUrl = _allowingReadAccessToURL ? [RCTConvert NSURL:_allowingReadAccessToURL] : request.URL;
[_webView loadFileURL:request.URL allowingReadAccessToURL:readAccessUrl];
}
}