Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending data directly between phones that are not co-located

Tags:

ios

iphone

I have an idea for an iPhone app that will make billions of dollars for me, and help me take over the world. I am currently designing the architecture of the application. I had originally assumed that I would need to create and host a database that would allow users to upload their data and share it with other, targeted, users. But I thought it would be better if the users could send their data directly to each other without having it stored in a database. However, I haven't been able to find anything that would suggest this is possible.

Is it possible to send data between iPhones that are not in close proximity (bluetooth) and not on a LAN? For instance...User #1, who is in Tennessee, creates some information and hits "Send to others" and it sends that information directly to User #2, who is in Arizona, and User #3, who is in Maine. Could the text messaging functionality be hacked to do that?

(I realize that the phones belonging to Users #2 and #3 would have to be on, and running the app that would receive the data)

I am new to mobile development, and I am still getting used to the functionality of mobile devices so, I am certain this is a dumb question. But, it is worth asking because, if it can be done, this would dramatically change the architecture (and maintenance costs) of this application.

Thanks, in advance, for whatever advice/pointers you can give.

like image 498
rogdawg Avatar asked Oct 22 '22 23:10

rogdawg


2 Answers

This is something handled by using the publish - subscribe pattern. You may want to look into a plug 'n play service such as pubnub. That will let you do just that. Phones that should be receiving each other's messages will have listeners set up on the same pubnub channel, and will receive a notification when any of the other phones publish to that channel. Something like pubnub has a pretty simple API/SDK that you can use to get a prototype up and running pretty quickly (and for free, at least at first).

like image 188
Dima Avatar answered Nov 03 '22 21:11

Dima


User #1's app sends the message to your server. You server does an APNS push to the phones of users #2, and #3. They don't even need to be running the app.

No need to mark this correct or up-vote it, but I will take a high-paying job in the new world order.

like image 33
danh Avatar answered Nov 03 '22 21:11

danh