tags:

views:

15

answers:

1

Hi,

I'm currently using cocoahttpserver to do some file sharing thing in my iPhone app. Does anyone know how to use public IP address to connect to the phone, that is to use the Internet, rather than internal connection via WiFi.

Any help would be appreciated! Thanks in advance.

A: 

Some thoughts on running an HTTP server on an iPhone:

  • Most of the time, with IPv4 addresses, the IP address is what is known as a “NAT” address. Simply put, the address it uses can only be accessed from other computers on the same network. It usually can not be accessed from the internet at large.
  • IPs can can be accessed from the internet at large cost quite a bit of money to have. They do not exist for wireless 3G networks.
  • Web servers like Apache and lighthttpd compile and run fine on an iPhone. However, the iPhone needs to be jailbroken before running these servers (but there appears to be a web server app for the iPhone)
  • Apache needs text files to be edited to be configured. It’s a great web server, but people who want to use it better be comfortable reading documentation and editing text files by hand.
samiam
Thanks for your explanation. Seems this is impossible at the moment.
nonamelive