mercredi 29 octobre 2014

xCode can't connect to localhost after xcode 6.1 update


Vote count:

2




My app makes use of a PHP backend API (in Laravel) (and another app uses standard PHP, not a framework).


I had xCode 6.0 and my apps connected to the server just fine, now I upgraded to 6.1, and no app I have will connect to the server. The error it gives is:



The requested URL was not found on the server.


This is very frustrating.


The following is the URL:



var URL: String = "http://localhost/laravel/myProject/public/"


and in the browser:


in the browser


So as you can see, it works just fine in the browser.


Here is the 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)!


asked 3 mins ago







xCode can't connect to localhost after xcode 6.1 update

Aucun commentaire:

Enregistrer un commentaire