Category Archives: Serialization

What happens when your iPhone App gets updated via iTunes/app store?

Well, all the data files in core data & personal folders within the app’s isolated storage are NOT cleared out. So, if you’re doing something crazy like serializing data to a a file and you change the class structure, make sure you find a way to version it.

Also, probably not a great idea to version it by filename, since you’ll never clear out the old, unused ones. I like using a Version property and checking against that. Simple, effective.

Also, MonoTouch rocks at serializing POCO objects into files. In this case, it’s the custom word list for my iPhone app Buzzwordingo. The quickest way I found to allow custom lists? Serialize a List<string> to a file. Deserialize, update, Serialize.

I will also be using this serialization technique to add board-state persistence, so that @detroitpro will stop whining.