iOS Question Security policy requires the use of a secure connection (SOLVED)

ilan

Expert
Licensed User
Longtime User
hi

i am trying to download a file from my server but i get this error:

ResponseError: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection., status code: 0

now i found this thread: https://www.b4x.com/android/forum/threads/ats-app-transport-security.74281/#content
and on my app #ATSEnabled: is set to True, what esle do i need to do to be able to download that file?

thanks, ilan
 

ilan

Expert
Licensed User
Longtime User
setting: #PlistExtra: <key>NSAppTransportSecurity</key><dict><key>NSAllowsArbitraryLoads</key><true/>
solved the issue!

looks like this now:

B4X:
    #PlistExtra: <key>NSAppTransportSecurity</key><dict><key>NSAllowsArbitraryLoads</key><true/>
    #PlistExtra: <key>NSExceptionDomains</key><dict>
    #PlistExtra: <key>ftp.sagital.net</key><dict><key>NSIncludesSubdomains</key><true/><key>NSExceptionAllowsInsecureHTTPLoads</key><true/></dict>
    #PlistExtra: <key>www.sagital.net</key><dict><key>NSIncludesSubdomains</key><true/><key>NSExceptionAllowsInsecureHTTPLoads</key><true/></dict>
    #PlistExtra: </dict>
    #PlistExtra: </dict>
 
Upvote 0
Top