so i started using swift for the first time about 22 hrs ago. and so far so good, I have an app that lists dogs when you add them to the list.
Now I'm trying to link this up with a PHP server and a database. so when the app runs, it should get a list of dogs from the server (a working example is shown in this picture:
this is run on the same mac as the IOS simulator which throws this error when I run the app:
I've worked out that data
is nill when it reaches the print statement. I can't work out why it's nil though.. Have i missed something?
Can anyone see what the problem is here?
anything else you want to see, leave a comment and i'll be happy to provide.
thanks
Extra Information
At dan's suggestion i typed in po error and got the following returned:
Optional<NSError>
- Some : Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL"
UserInfo={NSErrorFailingURLStringKey=192.168.0.8/classes/main.php?
fn=dogBoardingGet, NSErrorFailingURLKey=192.168.0.8/classes/main.php?
fn=dogBoardingGet, NSLocalizedDescription=unsupported URL,
NSUnderlyingError=0x7c434860 {Error Domain=kCFErrorDomainCFNetwork
Code=-1002 "(null)"}}