LoginSignup
11
11

More than 5 years have passed since last update.

SwiftでHTTPリクエストを許可する

Last updated at Posted at 2015-11-28

iOS9ではデフォルトでhttpリクエストがhttpsに変更させられてしまうらしい
httpを許可する方法をメモ

info.plistを編集

info.plistに下記項目を追加する

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

追加後はこのような表示になります

これでWebViewなどでhttpリクエストでページを表示させることが出来ます

11
11
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
11
11