Download images to my application

I am having problems downloading images to my app.
My images are available on a web server that does not have a trusted certificate.
I am trying to fill images in my uitablelistview from my server web link but its giving the following messages.

**2018-12-21 15:48:04.684268+0200 EazyShop[41272:3753779] TIC SSL Trust Error [24:0x6000022ed380]: 3:0
2018-12-21 15:48:04.686436+0200 EazyShop[41272:3753779] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813) **
This is a known problem, and i am trying to avoid this by adding the following keys to the info.lplist

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

This didn't solve the problem and i am stuck in this.

I have tried to add
- NSExceptionAllowsInsecureHTTPLoads: true
- NSAllowsAnyHTTPSCertificateForHost true

the same problem :/ :/ :/ :/

Note that my server does not have a domain name and the link is only an IP address

Answers

  • ColeXColeX Member, Xamarin Team Xamurai
    edited December 2018

    Add the following string in your info.plist.

          <key>NSAppTransportSecurity</key>
          <dict> 
            <key>NSExceptionDomains</key>
            <dict>   
              <key>your domain</key>
              <dict>   
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSIncludesSubdomains</key>
                <true/>
                <key>NSExceptionMinimumTLSVersion</key>
        <string>TLSv1.0</string>
              </dict>     
            </dict>
          </dict>
    
  • XAMARINROCKXAMARINROCK Member ✭✭

    Hey Colex
    Thank you for your reply.
    This didnt help since i don't have a domain name to rely on.
    My source link contains an ip address, not a domain name.

    is there a way to exclude an ip address not a domain name?
    Thank you

  • ColeXColeX Member, Xamarin Team Xamurai

    Apple takes TLS1.2 to encrypt after iOS9 . Does you server support TLS1.2 ?

Sign In or Register to comment.