Swift

Loading http websites in Swift iOS

An unexpected quirk when developing my first web browser in Swift iOS was that http addresses do not load by default. This is due to the default setting being to only load https to encourage better security.

However, I would still like to be able to browse http only websites. So here’s what to do.

  1. Go to info.plist in your xCode project.
  2. Click on “App Transport Security Settings” on the tiny plus icon.
  3. Select “Allow arbitrary loads” and set the boolean value to true.

info.plist App Transport Security Setting

That’s it, you’re good to go!

Leave a comment