mirror of
https://github.com/status-im/react-native-webview.git
synced 2026-08-31 11:41:08 +00:00
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:
committed by
Thibault Malbranche
parent
9ed05b2d1d
commit
c366fdf2e7
+1
-1
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user