Post

Replies

Boosts

Views

Activity

Reply to App Transport Security has blocked a cleartext HTTP
I was getting the error: "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." I realized the compiler was complaining about a parameter I had specified on a URLComponents object. The URLComponents object's .scheme paramater was set as "http", so I changed it to "https" and voila error goes away. Maybe somewhere in your url object, there is an "http", and the compiler wants "https". Hope this helps. Also, make sure if you haven't already added the dictionary "App Transport Security Settings" to your main app targets info, inside this dictionary there should be a boolean value "Allows Arbitrary Loads", it's value should be set to "YES" This was done on XCode 13 beta 1
Jul ’21