Sfoglia il codice sorgente

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
hank121314 5 anni fa
parent
commit
c366fdf2e7
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      ios/RNCWebView.m

+ 1
- 1
ios/RNCWebView.m Vedi File

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