Re: [iPhone] get iPhone's IP address...

2009-07-20 Thread Luke Hiesterman
I should also have mentioned that you should be able to get the functionality you need via CFHost. Luke Sent from my iPhone. On Jul 20, 2009, at 6:33 AM, Luke Hiesterman wrote: Please note that NSHost is NOT publicly supported API on iPhone. Attempts to use it may result in unexpected beh

Re: [iPhone] get iPhone's IP address...

2009-07-20 Thread glenn andreas
On Jul 20, 2009, at 12:50 AM, James Lin wrote: Hi all, I found this code snipet that's supposed to return the iPhone's IP address. I am wondering if anyone can confirm the method for me. As i am told that this method works in an actual iPhone and not on the simulator. But i won't have a

Re: [iPhone] get iPhone's IP address...

2009-07-20 Thread Luke Hiesterman
Please note that NSHost is NOT publicly supported API on iPhone. Attempts to use it may result in unexpected behavior and broken applications in future iPhone revisions. Also, using private classes is a breach of the iPhone developer terms and conditions. Finally, using a private class such

Re: [iPhone] get iPhone's IP address...

2009-07-20 Thread Peter Duniho
On Jul 19, 2009, at 11:51 PM, Kyle Sluder wrote: On Jul 19, 2009, at 11:36 PM, KK wrote: Does the iPhone have NSURLConnection? If so, you can just point that to www.whatismyip.com or a similar site, and just parse the information. This is ridiculous. Send an HTTP request to an unreliable

Re: [iPhone] get iPhone's IP address...

2009-07-20 Thread Jim Puls
On Jul 19, 2009, at 10:50 PM, James Lin wrote: - (NSString*) getNetAddr { char iphone_ip[255]; strcpy(iphone_ip,"127.0.0.1"); // if everything fails NSHost *myhost =[NSHost currentHost]; //NSHost *myhost = [[NSHost alloc] init]; if (myhost) { NSLog(@"myhost

Re: [iPhone] get iPhone's IP address...

2009-07-19 Thread Kyle Sluder
On Jul 19, 2009, at 11:36 PM, KK wrote: Does the iPhone have NSURLConnection? If so, you can just point that to www.whatismyip.com or a similar site, and just parse the information. This is ridiculous. Send an HTTP request to an unreliable third party and parse the unwarranted contents of

Re: [iPhone] get iPhone's IP address...

2009-07-19 Thread KK
Does the iPhone have NSURLConnection? If so, you can just point that to www.whatismyip.com or a similar site, and just parse the information. On Mon, Jul 20, 2009 at 3:11 PM, Clark Cox wrote: > On Sun, Jul 19, 2009 at 10:50 PM, James Lin wrote: > > Hi all, > > > > I found this code snipet that's

Re: [iPhone] get iPhone's IP address...

2009-07-19 Thread Clark Cox
On Sun, Jul 19, 2009 at 10:50 PM, James Lin wrote: > Hi all, > > I found this code snipet that's supposed to return the iPhone's IP address. > > I am wondering if anyone can confirm the method for me. > As i am told that this method works in an actual iPhone and not on the > simulator. > But i won'

[iPhone] get iPhone's IP address...

2009-07-19 Thread James Lin
Hi all, I found this code snipet that's supposed to return the iPhone's IP address. I am wondering if anyone can confirm the method for me. As i am told that this method works in an actual iPhone and not on the simulator. But i won't have an iPhone until Aug 9th All i am getting in th