Search code examples
iphoneiosgame-centericloudsharing

How to share data between multiple devices within a universal App to keep Apps in sync?


I've made an application which supports game center. A user can play a certain amount of levels and can achieve a score for each level. The score is being kept by using Arrays filled with dictionaries with info of the score of each round.

Because this game is using game center I would realy like to keep my games in sync if a user uses multiple devices to play on with the same game center ID. How can I achieve this to have a real time 'game updater' to share the score of each level between multiple devices?

Does game center brings such functionality? Is there a way to push data trough iCloud? or should I consider using a backend server which saves and loads the scores for each level and for each user?

Follow up of tkanzakic his answer:

I found this helper class for synching all my NSUserdefaults data link


Solution

  • I haven't play with Game Center so I don't know if you can share information between multiples devices, but with iCloud for sure that you can. If you store this information in the user's defaults it will be automatically shared trough this services, check this http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/UserDefaults/StoringPreferenceDatainiCloud/StoringPreferenceDatainiCloud.html