ios - UIWebview White Page -


why happening? can not understand. doing wrong? when run simulator i'm having problem.

code :

import uikit  class viewcontroller: uiviewcontroller {      @iboutlet weak var websayfasi: uiwebview!     var urlpath = "http://google.com.tr "      func loadadressurl(){          let requesturl = nsurl (string:urlpath)          let request = nsurlrequest(url: requesturl!)         websayfasi.loadrequest(request)         self.view.addsubview(websayfasi)         }      override func viewdidload() {         super.viewdidload()     }     override func didreceivememorywarning() {         super.didreceivememorywarning()     } } 

enter image description here

this has app transport security settings of application. apple added security measures arbitrary http loads. try following method:

step 1: go info.plist file

step 2: add new key: "app transport security settings"

step 3: add boolean subkey, "allow arbitrary loads", set yes

step 4: add dictionary subkey, "exception domains"

step 5: add string subkey "exception domains" url causing error (http://www.google.com.tr in case)

at end, should (with url of course)

enter image description here


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -