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() } }
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)
Comments
Post a Comment