Beware UserDefaults: a tale of hard to find bugs, and lost data

Excuse the alarmist title, but I think it&rsquo;s justified, as it&rsquo;s an issue that&rsquo;s caused me a ton of pain in both support emails and actually tracking it down, so I want to make others aware of it so they don&rsquo;t similarly burned. Brief intro For the uninitiated, UserDefaults (née NSUserDefaults ) is the de facto iOS standard for persisting non-sensitive, non-massive data to…