views:

149

answers:

2

I have gone through following link

http://zachwaugh.com/2009/03/programmatically-retrieving-ip-address-of-iphone/

& I have also tried this one ( but this isn't recognized by apple )

http://appsamuck.com/day4.html

Oke let me specify what is my need .. . ..

I just want that when user tap on "wifi" button.

Reports stored in documents directory can be accessed by other pc using wifi using the ip that I display on my iPhone application...

How is it possible?

Thanks in advance for sharing your knowledge.

Sagar.

+1  A: 

I can't point to any specific examples but the way to do this would be the ZeroConf protocol - both the iPhone and PC would have to be on the same network to have this work.

Kendall Helmstetter Gelner
+1  A: 

In my apps, I use CocoaHTTPServer to get local info into and off of the phone. You run the server and out-of-the-box, it indexes all the files in the documents directory.

To do what you want, you will need to edit the code to return some other kind of data format (xml probably is the easiest) the call this from inside your app to get that data. CocoaHTTPServer easily take POST right out of the box too, so you can post an xml response as well.

After thinking about it, CocoaHTTPServer is best run on the computer side behind the scenes. the iphone can then send info to the computer where handling the code should be easier and you have more options.

coneybeare