Connecting the iPhone to an external device
This is a too open question. Yes is the only answer; yes, you can connect to another device (assuming it has the ability to handle the connection request) via Wi-Fi or Bluetooth
If you want to connect over WiFi, you will need to manage this yourself (perhaps via HTTP requests or similar hardware).
If you want to connect to a device via Bluetooth to avoid having to use the 30-pin dock connector, check out the frontend documentation (EAAccessory class reference) in the xcode documentation.
a source to share
Thanks everyone for the answers. I came up with a solution, please let me know if this will work and if apple accepts it:
The solution is to just use the device with ip (ie: 101.98.13.27). The device will be connected to Wi-Fi. I will send a URL request to this address and receive information from the device.
a source to share
If you try to use the ip address as you suggest, you cannot hardcode it. Even if it's in a private, non-routed block of addresses, that address can still be used on the Wi-Fi subnet to which the phone is connected. If not, there is no guarantee that the connection will work depending on the resolvability of the network devices involved.
Do you still have to configure an external device? If so, my preferred solution would be to put both the external device and the iPhone on the same Wi-Fi network and then use mDNS (bonjour or rendezvous same thing) to have the two devices discover each other on the network.
I had a similar situation that would have been easily resolved if the iPhone just supported the Bluetooth serial profile, but it doesn't. This is basically what I planned to do, but the external device was unable to support this approach.
a source to share