Reputation: 492
For our iOS application I am using AWS server and for a particular API I am always getting failed with error "API failed with error Error Domain=NSURLErrorDomain Code=-1003. A server with the specified hostname could not be found."
I am using AFNetworking for making API request.
Any hints as to where I might be going wrong? Whether its as API/Server issue or a client/iOS side issue.
Upvotes: 3
Views: 2660
Reputation: 826
There is 2 main reasons:
in my case my url was encoded to another in background because of copying it from other file. when I delete the url and retype it then it works.
Upvotes: 0
Reputation: 3908
This error would typically suggest a DNS related issue.. It had nothing to do with AFNetworking (except for maybe reporting the wrong error)
Upvotes: 1