Question

Im working on a multiplayer turn based game in xcode for iphone/ipad im considering my options when it comes to where to save users details such as name / points ect. I was considering creating a plist and storing data in this also i have considered nsuserdefaults and also core data.

Basically majority of the time the user will be adding new details on every launch however this will not be the case 100% of the time.

What would you guys consider the best approach?

Was it helpful?

Solution

This really depends on multiple factors:

  • How much data is it going to be saved?
  • How fast the data needs to be loaded?

I suggest you create a serializable object, that conforms to NSCoding protocol. There is also an option to save this as JSON or like you noted, plist.

I think Core Data is too much boiler plate, if this is all you are storing. NSUserDefaults is fast enough and already prepared for you to use.

I don't think someone can give you the correct answer, I suggest you experiment with all the options and see which one is the best for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top