소스 검색

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 4 년 전
부모
커밋
c366fdf2e7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      ios/RNCWebView.m

+ 1
- 1
ios/RNCWebView.m 파일 보기

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