I noticed that many times when developing for iPhone 3G, BSD socket functions simply fail. I also noticed that at that time the 3G antenna was not even turned on, and there was no WIFI Access for backing up the network call (so it seems ridiculous that it did not enable network request support). This information was verified using an Apple application in the SDK called Connectivity Test, or something like that.
Basically, if you download Safari or something like that, then quickly download the application, it will be fine. Of course, this is not perfect. Apparently, for an apple, gethostbyname () or something like that is by no means a reason to turn on the Antenna.
I contacted Apple about this, and they said that the BSD functions do not include the Antenna, but calling all the functions of Objective-C CFNetwork does. I need portable code, so is there a way to keep the existing BSD setup? I really don't like coding in Objective-C, so if someone knows this will work, it will be awesome.
source
share