LoginSignup
3
0

More than 5 years have passed since last update.

ReactNativeのWebviewでhttpを許可する

Last updated at Posted at 2016-10-11

React Nativeのwebviewでhttpを表示しようとすると

Error Loading Page
Domain: NSURLErrorDomain
Error Code: -1022
Description: The resource could not be loaded because
the App Transport Security policy requires the use of a
secure connection

となって表示できないので対処法。
プロジェクト内のinfo.plistをXcodeで開いて下の方にある App Transport Security Settings項目のException Domainsに適当な名前でtypeはDictionaryで追加します。
さらにその項目内にtypeはbooleanでNSTemporaryExceptionAllowsInsecureHTTPLoadsを追加してValueをYESにします
image

以上です。

参考

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0