Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
c366fdf2e7
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1
    1
      ios/RNCWebView.m

+ 1
- 1
ios/RNCWebView.m Dosyayı Görüntüle

@@ -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
 }