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.
-
Core Data is meant for local storage only. What you want to use is CloudKit which is a Apple's remote backend service, it will feel very similar to Core Data and shouldn't take you that long to figure out....You could also use Parse.com as well. – DBoyer Jul 22 '15 at 05:37
3 Answers
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

- 23
- 7
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.

- 2,510
- 2
- 27
- 47