Transfer Data From App to App? - ios

Heres my plan. Two people have my app and I need to get a bunch of data from one to the other.
The person receiving the data doesn't know that they might be sent something, they two people could be in completely different places in the world, so it can't be transferred locally.
So, our of maybe thousands of people who use the app, I could have it, host a bunch of data and then only my specified receivers could then get that data from me and have it in their app.
I am VERY new to server/network stuff, so as much detail in your responses would be hugely helpful.
Any help or tips on how to do this would be much appreciated, thanks.

Sounds like a classic client server.
Setup a server.
Have app from user A send data to server.
Send push notification to us B he has new data.
When user B open the app have him poll the server for his new information.

Store the data in an online database.

Related

link 2 iPhones for a single iOS app database

I'm developing an app for my summer iPhone class that is designed for couples, and am not sure the best way to have two different users phones reading and writing to the same database for a single account. The two users create and grant points to each other for "rewards", "penalties" and "prizes". I'm attempting to put the local databases into CoreData and then push it into iCloud. However, I'm only finding ways that that works for a single persons app. This is a two player game that needs to update a shared database. I would greatly appreciate if you would have any suggestions on ways to either send notifications directly to each and maintain congruent separate local databases, or to have a single back end database for two users in a single account that both users' phone can push and pull from to read and write. I'm having trouble finding the right path to pursue for this.
Thanks.
You can easily save Database on server side with the help of many mechanism like PHP Script is the best example for this.
link - Advices on server implementation for server/client structure iOS App development?
There is a third-party framework for iOS called Parse. It's a terrific backend service that adds a cloud database. You can create objects and store it in the cloud and access it anytime, and it comes with push notifications and analytics functionality. It's tuned for many platforms, including iOS and it's straightforward to access all of its functionalities.
The site is here: https://parse.com
Whenever you try to use one database for multiple device, you need to create / save database in server side or you can try Parse. because local database is always used for device specific.

Parse: Basic App to App Communication

I am trying to figure out what the basic steps are for getting data passed between users. For example, say I, a user of the app, want to send another user of my app a message or a geopoint or some other form of data. I know the first step would be posting the data to Parse, which I don't have a problem with. But then, how would the other user know there is data to retrieve and also how would they go about retrieving it. Are push notifications the proper and only way of letting the recipient's app know its being sent something? When the recipient app knows there is data posted intended for it to retrieve, how does it go about locating it with a PFQuery? Does the posting app need to supply the receiving app with a UID of some form that the receiving app can then use in its query to locate the data? This is kind of the last puzzle piece for my app and unfortunately it's the only thing Parse didn't make clear to me. It is more than likely user error on my part not finding the correct documentation but, app to app communication is key in most apps and so I need to figure out the defacto way that Parse accomplishes this. Thanks in advance for any help!
You can have a relational table lets say "Messages" table in Parse,
with properties, sender (Pointer to a User), recipient (Pointer to a User) and message (String). and maybe a 'read' Boolean.
You could then query the messages table, With something like:
PSEUDO:
get all messages where recipient is equal to logged in user.
and display these messages on the UI.
Its pretty straightforward, I have done simple messaging service with Parse before
Thanks guys! In the end, I think it is best for a device to not have to be querying for changes but rather to be notified when it has new data to retrieve. Thus, for my uses, I think a combination of your answers, especially with the "onSave" hook function mentioned by Bruno, is the best solution.

How to get User Data from the App?

Is there a way to get data from the user while they use my app on their device (iPhone/iPad). For example, if the app fills a dictionary during the runtime about which avatar is used most of the time and which avatar not, is there a way to transfer that dictionary to me? Do I need a server?
This is my first time thinking about data transfers over the internet. I don't have any idea or any experience on how to do that. Somehow I feel it is impossible for some security reasons. I found the NSURLConnection class, but this seems to be only one way to move data from a server to the app.
Thanks.
Not sure if I fully understand the question, but I am assuming you would like to get information about how the user is using your application?
This is definitely possible; and yes, you will need a server to send, retrieve or store the information that you require, or else there is no way to get the data from the application to you! You will need to learn how server side and client side web scripting works (if you do not know already) as this is how the application will communicate with your server.
Depending on the kind of information you are trying to retrieve, there may be security issues and Apple may not accept your application. However, if your data is specific to your application features, there should be no issue of this kind.
HTH

Share objects between people who are using the same app in real-time (push)

I'm pretty new to objective-c, so i came up with this..I've found other similar questions, like mine, but there were all different at some point..
So, i have a tableview which contains cells, and the cells are containing data (NSManagedObjectModels). I have this app on 1 device, and I'd like to share these cells, i mean data, with other people, who are using the exact same app (i'd like to use only wifi or network connection).
Just like in Reminders (in iOS pre-installed app) when i create a new list, i have the option to share it with someone else(s), and the person who i've shared with, can see the list i created-immediately.
Is there a simple, or any way to accomplish that?
The simplest way would be to send a push notification to all users with a URL linking to data you want to share.
But even that means that you'll have to have a server store away details of push tokens (so you can push to each device) and then provide some way for users to group different devices...
I would look the sessions on CloudKit and see if from that you can see a way to do what you want, otherwise look at libraries that provide easy server integration to make passing data up to the server easier.

Xcode chat app, creating dynamic views - a little lost

Am just about to start doing an iphone application which is supposed to have a multi user private chat. Something like facebook style, where the user has a list of friends and he can chat with them independently. I just need a little direction here
If i have a list of users, let's say i create individual views for the chat, how can I handle these views? If jim is chatting with dick and jane, there should be 2 views, each for one chat window right? Are there any references that i can use.
I am looking for references in socket programming where i can push messages to the user from the server. I have been looking but could not find anything helpful.
If i try to update the user's chat window using local notifications, lets say request data every couple of seconds, will that be battery draining?
I would really like some direction here, i do not want to start something just realize its the wrong way.
Any help is highly appreciated
Those all sound like design decisions. For example, do you want to display each user's messages in a separate view? That's entirely up to you.
You'll want to read about iOS Push Notifications.
If you mean that you intend to poll some server for updates, then yes, that will use a lot of battery. This is exactly the sort of situation that the push notification system was created to help you avoid.

Resources