0

I want to make an iPhone application which save some information locally on the app folder and those information I want also to be shared on other app installations made on different devices.

I make an example:

In my app I can read and write a file and its content can be saved locally. Always in this app, there is a button "share" through which I can send (for example by email) the written file to another user which have the same app installed. Is it possible to do a similar thing, without passing through a mine Server or it's necessary to build an infrastructure between the two client apps to allow them to communicate?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Marco
  • 656
  • 9
  • 28
  • Maybe http://stackoverflow.com/questions/11737209/ios-share-data-between-apps helps? Or http://stackoverflow.com/questions/9425706/share-data-between-two-or-more-iphone-applications ? – Rob Nov 14 '12 at 22:19
  • @Rob He's asking about sharing between the same app on two different devices, not two apps on the same device. – rmaddy Nov 14 '12 at 23:05
  • 1
    iCloud would be a good choice if sharing across devices of the same user. If sharing the data between different people then you need a way to get the file from one person to the other. Email or a 3rd party server works. Email is good if you setup your app so it can be used to open the email attachment. – rmaddy Nov 14 '12 at 23:07
  • Or [DropBox](https://www.dropbox.com/developers/reference/sdk). – Rob Nov 14 '12 at 23:35
  • @rmaddy: is it possible to open an email attachment file with my app? Do you know any tutorial? – Marco Nov 15 '12 at 08:18
  • @Rob: is it possible to integrate dropbox service with some libs on iOS app? – Marco Nov 15 '12 at 08:19
  • 1
    @Marco see the DropBox API documentation [here](https://www.dropbox.com/developers/reference/sdk) – Rob Nov 15 '12 at 08:27

1 Answers1

1

Choices for sharing files between two devices belonging to the same user include iCloud and DropBox. If iOS only, the former is probably easiest.

Edit:

I picked up on the notion of "sharing between devices", but only now notice that you're talking about sending files between two different people. That's a whole different ball of wax. If different people, then neither of those are well suited (while DropBox can share between users, I suspect the API is not entirely well suited for that).

Unfortunately for you (but good for the rest of us), you cannot have your app read/intercept email on the destination device. But if you're able, you could define your own file extension, email such a file, and when the file is received at the remove iPhone, when the user opens the file, the device would know to open your app (if the app was installed). This scenario is discussed in Ray Wenderlich's article.

If that's not an option, then you might be certainly talking about writing your own server code to receive, hold, and deliver upon request the file to the destination user. If that's unacceptable, you'll have to share some specifics about how the app is to know that one user is sending something to someone else (without relying on programmatically receiving an email or SMS). And if you don't want to store the file on your server, but rather do something directly device to device over internet, you still might need server to coordinate the process.

Rob
  • 415,655
  • 72
  • 787
  • 1,044
  • iCloud doesn't give to me the control that i want. I need only to send a file to another iPhone. Maybe DropBox could help me, but the best thing for my context cuold be email. But, can i force to open an attachment with my app? – Marco Nov 15 '12 at 11:39
  • yes Rob, different user!!! I wrote it in my example ("send the written file to another user")...maybe it wasn't too much clear my problem. Sorry. – Marco Nov 15 '12 at 13:51
  • 1
    "But if you're able, you could define your own file extension, email such a file, and when the file is received at the remove iPhone, when the user opens the file, the device would know to open your app (if the app was installed)." I think it's exactly what i need ! – Marco Nov 16 '12 at 07:14