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にします
以上です。