title: App settings, specifically Root.plist got corrupted. Why?
body: <p>My app started crashing mysteriously today, when running via Xcode. I tracked the problem to the settings not being available, and in fact, looking at the settings app for my app, I see:</p>
  
  <p><img src="https://i.stack.imgur.com/ReK4k.png" alt="enter image description here"></p>
  
  <p>Going to my Settings.bundle in Xcode, specifically Root.plist, I get this error message:</p>
  
  <p><img src="https://i.stack.imgur.com/LC87z.png" alt="enter image description here"></p>
  
  <p>So, the file has been corrupted. Disturbing, but not too worrisome.  I get a copy of the file from last night (thanks TimeMachine).  I do a diff between that file and the one I have now, and I see no difference.  I go back a few days until I find a version that is different.  Unfortunately that was when I seriously revamped the root.plist file, so I can't find anything corrupted in the latest version.</p>
  
  <p>Also, the app only crashes on a new iPhone where my app was never installed before.  My other iPhones don't crash when running the same app via Xcode, but all show an empty Settings window as in the screenshot above.  I think that maybe despite the corrupted root.plist, the actual NSUSerDefaults are still on the iPhones that at one point had a non-corrupt root.plist, but on the new iPhone there is no NSUSerDefaults, which leads to some bad things in my app.</p>
  
  <p>Here is my plist content.  Can you spot anything that is corrupted?  Thanks. (I already checked <a href="https://stackoverflow.com/questions/7162846/empty-settings-bundle-in-xcode-4-2">SO: Empty Settings Bundle in Xcode 4.2</a> and it doesn't help.)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
  &lt;plist version="1.0"&gt;
  &lt;dict&gt;
      &lt;key&gt;PreferenceSpecifiers&lt;/key&gt;
      &lt;array&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSGroupSpecifier&lt;/string&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSMultiValueSpecifier&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;Initial Magnification&lt;/string&gt;
              &lt;key&gt;Values&lt;/key&gt;
              &lt;array&gt;
                  &lt;integer&gt;1&lt;/integer&gt;
                  &lt;integer&gt;2&lt;/integer&gt;
                  &lt;integer&gt;3&lt;/integer&gt;
              &lt;/array&gt;
              &lt;key&gt;Titles&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;1x&lt;/string&gt;
                  &lt;string&gt;2x&lt;/string&gt;
                  &lt;string&gt;3x&lt;/string&gt;
              &lt;/array&gt;
              &lt;key&gt;Key&lt;/key&gt;
              &lt;string&gt;LuminInitialMagnificationKey&lt;/string&gt;
              &lt;key&gt;DefaultValue&lt;/key&gt;
              &lt;integer&gt;2&lt;/integer&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSToggleSwitchSpecifier&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;Large Lock Button&lt;/string&gt;
              &lt;key&gt;Key&lt;/key&gt;
              &lt;string&gt;LuminLockButtonEmphasis&lt;/string&gt;
              &lt;key&gt;DefaultValue&lt;/key&gt;
              &lt;true/&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSToggleSwitchSpecifier&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;Picture-in-Picture Frame&lt;/string&gt;
              &lt;key&gt;Key&lt;/key&gt;
              &lt;string&gt;LuminOutlineEnabled&lt;/string&gt;
              &lt;key&gt;DefaultValue&lt;/key&gt;
              &lt;true/&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSGroupSpecifier&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;Sound&lt;/string&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;DefaultValue&lt;/key&gt;
              &lt;false/&gt;
              &lt;key&gt;Key&lt;/key&gt;
              &lt;string&gt;LuminFocusBeepKey&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;Focus Beep&lt;/string&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSToggleSwitchSpecifier&lt;/string&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSGroupSpecifier&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;Share Options&lt;/string&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSChildPaneSpecifier&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;Mail&lt;/string&gt;
              &lt;key&gt;File&lt;/key&gt;
              &lt;string&gt;EmailSettings&lt;/string&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSChildPaneSpecifier&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;Tweet&lt;/string&gt;
              &lt;key&gt;File&lt;/key&gt;
              &lt;string&gt;TweetSettings&lt;/string&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSChildPaneSpecifier&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;Facebook&lt;/string&gt;
              &lt;key&gt;File&lt;/key&gt;
              &lt;string&gt;FacebookSettings&lt;/string&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSGroupSpecifier&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;History&lt;/string&gt;
              &lt;key&gt;FooterText&lt;/key&gt;
              &lt;string&gt;Tagged images will not be deleted. Dropbox mirroring is queued until WiFi connectivity is available.&lt;/string&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSMultiValueSpecifier&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;Delay Before Saving&lt;/string&gt;
              &lt;key&gt;Values&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;1&lt;/string&gt;
                  &lt;string&gt;3&lt;/string&gt;
                  &lt;string&gt;5&lt;/string&gt;
                  &lt;string&gt;7&lt;/string&gt;
              &lt;/array&gt;
              &lt;key&gt;DefaultValue&lt;/key&gt;
              &lt;string&gt;3&lt;/string&gt;
              &lt;key&gt;Titles&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;1 second&lt;/string&gt;
                  &lt;string&gt;3 seconds&lt;/string&gt;
                  &lt;string&gt;5 seconds&lt;/string&gt;
                  &lt;string&gt;7 seconds&lt;/string&gt;
              &lt;/array&gt;
              &lt;key&gt;Key&lt;/key&gt;
              &lt;string&gt;LuminTimeToWaitBeforeHistoryKey&lt;/string&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSTextFieldSpecifier&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;Number of Images to Keep&lt;/string&gt;
              &lt;key&gt;Key&lt;/key&gt;
              &lt;string&gt;LuminNumberOfHistoryFilesKey&lt;/string&gt;
              &lt;key&gt;DefaultValue&lt;/key&gt;
              &lt;string&gt;100&lt;/string&gt;
              &lt;key&gt;KeyboardType&lt;/key&gt;
              &lt;string&gt;NumberPad&lt;/string&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;DefaultValue&lt;/key&gt;
              &lt;false/&gt;
              &lt;key&gt;Key&lt;/key&gt;
              &lt;string&gt;LuminDropboxActive&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;Mirror to Dropbox&lt;/string&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSToggleSwitchSpecifier&lt;/string&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSGroupSpecifier&lt;/string&gt;
              &lt;key&gt;FooterText&lt;/key&gt;
              &lt;string&gt;Lumin™ © 2011-2012 M. Zabetian &amp; BitsOnTheGo.com.  All rights reserved.  Special Thanks to Tim Smith and AppliedDesign.tv.&lt;/string&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;Type&lt;/key&gt;
              &lt;string&gt;PSTitleValueSpecifier&lt;/string&gt;
              &lt;key&gt;DefaultValue&lt;/key&gt;
              &lt;string&gt;Unknown&lt;/string&gt;
              &lt;key&gt;Title&lt;/key&gt;
              &lt;string&gt;Version&lt;/string&gt;
              &lt;key&gt;Key&lt;/key&gt;
              &lt;string&gt;AppVersionStringKey&lt;/string&gt;
          &lt;/dict&gt;
      &lt;/array&gt;
      &lt;key&gt;StringsTable&lt;/key&gt;
      &lt;string&gt;Root&lt;/string&gt;
  &lt;/dict&gt;
  &lt;/plist&gt;
  </code></pre>