Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Moses Gangipogu
3,772 PointsAFNetworking random error 1003 Host Name Not Found
Hello, my name is moses, i am trying to build my own app for android and iOS using objective-c(AFNetworking) but facing this issue very randomly only on iOS AFNetworking random error 1003 Host Name Not Found https://github.com/AFNetworking/AFNetworking/issues/967
i am using php for web services . how can i debug this issue ? and get to the root of it?
1 Answer
Caleb Kleveter
Treehouse Moderator 37,862 PointsThis post from stack overflow might be of help.
miguelcastro2
Courses Plus Student 6,573 Pointsmiguelcastro2
Courses Plus Student 6,573 PointsThe issue is due to DNS not resolving your web service hostname to an IP address. The issue could be due to the iOS framework. Without seeing your code I cannot really suggest more than changing your caching policy for NSURLRequest to NSURLRequestReloadIgnoringCacheData. By doing this you ensure that every request issues a DNS query and prevents iOS from caching the results of a bad DNS query.
Lastly, I would use Squish to ensure that all of your DNS servers are reporting the web service IP address properly.