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:
parent
9ed05b2d1d
commit
c366fdf2e7
|
@ -438,7 +438,7 @@ static NSURLCredential* clientAuthenticationCredential;
|
||||||
[_webView loadRequest:request];
|
[_webView loadRequest:request];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
NSURL* readAccessUrl = _allowingReadAccessToURL ? [NSURL URLWithString:_allowingReadAccessToURL] : request.URL;
|
NSURL* readAccessUrl = _allowingReadAccessToURL ? [RCTConvert NSURL:_allowingReadAccessToURL] : request.URL;
|
||||||
[_webView loadFileURL:request.URL allowingReadAccessToURL:readAccessUrl];
|
[_webView loadFileURL:request.URL allowingReadAccessToURL:readAccessUrl];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue