php - xCode can't connect to localhost after xcode 6.1 update -



php - xCode can't connect to localhost after xcode 6.1 update -

my app makes utilize of php backend api (in laravel) (and app uses standard php, not framework).

i had xcode 6.0 , apps connected server fine, upgraded 6.1, , no app have connect server. error gives is:

the requested url not found on server.

this frustrating.

the next url:

var url: string = "http://localhost/laravel/myproject/public/"

and in browser:

so can see, works fine in browser.

here connection script:

var post:nsstring = "username=\(globalvars.sharedinstance.getusername())&&lat=\(lat)&&long=\(lng)" var url:nsurl = nsurl(fileurlwithpath: "\(globalvars.sharedinstance.geturl())login")! var postdata:nsdata = post.datausingencoding(nsasciistringencoding)!

if want communicate http server should utilize nsurl(string:) instead of nsurl(fileurlwithpath:). create file url unusual name.

e.g.:

var url:nsurl = nsurl(string: "\(globalvars.sharedinstance.geturl())login")!

if doesn't work expected should start inspect variables involved. have caught issue, since url file://http:/localhost

php ios xcode swift

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -