I would like make an app like whatsapp but i dont know how to transfer data if i dont know the ip or location of the other device.
My idea is like whatsapp, get the ip device and send it the data… and dont use email.
My problem is that i dont know how get the ip of the device, how to send the data.
My idea is use a server and when you use the app save your iphone number or telephone number like primary key in database from server, foreign key ip from device.
Is good idea???
How i can get the ip of the device?
Wich class use to send NSData to the server??
Thanks
You should not use the Ip of the device, since most device are used on a cellular network which could be using NAT.
This would mean that only one IP address is used for multiple device.
Whatsapp use an XMPP server as there backend, which is just an IM server.
When the App get background they disconnect from the IM server and when the user receives a messages the server will just send them a push notification.
XMPP is open source and can easily be modified and there are a lot op opensource libraries to use. Just have a look on http://xmpp.org/