my problem is about not being able to access an https server after switching from wi-fi to 3g.
The error I get is Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server.
i tried the same thing using ASIHTTPRequest and AFNetworking libraries, both have the same thing.
i’m guessing the problem is about trying to use the same ssl credentials even though our ip is changed as a result of network switching. strange enough, this problem does not happen if you switch from 3g to wi-fi.
some notes:
i’m using an iphone 4 device.
device has ios 6.0 installed.
server side has apache php installed.
has there been somebody encountered this before? can i somehow clear any stored ssl credentials on ios cache? any thoughts on the subject?
The problem turned out to be a dns issue. Somehow working ip address was cached in wifi network but not in 3G network I think.