Forum Xamarin.iOS

Xamarin Ios Unable to load http webview

DiederiknDiederikn Member ✭✭
edited November 2019 in Xamarin.iOS



Hi,

I have a webview wich refers to an http website.

I have added NSAppTransport security so I can load the website. But this does not work.

What am I doing wrong?

I added 2 images wich are my WebviewController and mine Info.plist

Hopefully someone can help me out here?

Tagged:

Answers

  • ColeXColeX Member, Xamarin Team Xamurai
    edited November 2019

    Two suggestions

    1. Try to use postman to access your website to see if problem persists.

    2. Try to disable ATS instead of enabling specific domains ,replace NSAppTransportSecurity in info.plist

      <key>NSAppTransportSecurity</key>
          <dict>
              <key>NSAllowsArbitraryLoads </key>
              <true/>
          </dict>
      </key>
      
  • Imran_619Imran_619 Member ✭✭✭

    You have probably logged in then on Safari sometimes. If I enter the URL here I also get a prompt for a username and password.
    Looks like authentication failed. You may provide the username and password in the delegate didReceiveAuthenticationChallenge

    For more information on mobile app development you can visit ArStudioz

Sign In or Register to comment.