今天,当我通过Xcode运行时,我的应用程序开始神秘地崩溃。我将问题跟踪到设置不可用,事实上,查看我的应用程序的设置应用程序,我看到了:
转到Xcode中的Settings.bundle,特别是Root.plist,我收到此错误消息:
因此,该文件已损坏。令人不安,但并不太令人担忧。我从昨晚得到了该文件的副本(感谢TimeMachine)。我在那个文件和我现在拥有的文件之间做了一个差异,我看到没有区别。我回去几天,直到找到一个不同的版本。不幸的是,那时我认真修改了root.plist文件,所以在最新版本中找不到任何损坏的内容。
此外,该应用程序仅在以前从未安装过我的应用程序的新iPhone上崩溃。当通过Xcode运行相同的应用程序时,我的其他iPhone不会崩溃,但所有显示一个空的设置窗口,如上面的屏幕截图所示。我认为,尽管root.plist已损坏,但实际的NSUSerDefaults仍然在iPhone上,但有一点没有损坏的root.plist,但在新的iPhone上没有NSUSerDefaults,这导致了我的一些不好的事情。应用
这是我的plist内容。你能发现任何被破坏的东西吗?谢谢。 (我已经检查了SO: Empty Settings Bundle in Xcode 4.2但没有帮助。)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Initial Magnification</string>
<key>Values</key>
<array>
<integer>1</integer>
<integer>2</integer>
<integer>3</integer>
</array>
<key>Titles</key>
<array>
<string>1x</string>
<string>2x</string>
<string>3x</string>
</array>
<key>Key</key>
<string>LuminInitialMagnificationKey</string>
<key>DefaultValue</key>
<integer>2</integer>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Large Lock Button</string>
<key>Key</key>
<string>LuminLockButtonEmphasis</string>
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Picture-in-Picture Frame</string>
<key>Key</key>
<string>LuminOutlineEnabled</string>
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Sound</string>
</dict>
<dict>
<key>DefaultValue</key>
<false/>
<key>Key</key>
<string>LuminFocusBeepKey</string>
<key>Title</key>
<string>Focus Beep</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Share Options</string>
</dict>
<dict>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>Mail</string>
<key>File</key>
<string>EmailSettings</string>
</dict>
<dict>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>Tweet</string>
<key>File</key>
<string>TweetSettings</string>
</dict>
<dict>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>Facebook</string>
<key>File</key>
<string>FacebookSettings</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>History</string>
<key>FooterText</key>
<string>Tagged images will not be deleted. Dropbox mirroring is queued until WiFi connectivity is available.</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Delay Before Saving</string>
<key>Values</key>
<array>
<string>1</string>
<string>3</string>
<string>5</string>
<string>7</string>
</array>
<key>DefaultValue</key>
<string>3</string>
<key>Titles</key>
<array>
<string>1 second</string>
<string>3 seconds</string>
<string>5 seconds</string>
<string>7 seconds</string>
</array>
<key>Key</key>
<string>LuminTimeToWaitBeforeHistoryKey</string>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>Number of Images to Keep</string>
<key>Key</key>
<string>LuminNumberOfHistoryFilesKey</string>
<key>DefaultValue</key>
<string>100</string>
<key>KeyboardType</key>
<string>NumberPad</string>
</dict>
<dict>
<key>DefaultValue</key>
<false/>
<key>Key</key>
<string>LuminDropboxActive</string>
<key>Title</key>
<string>Mirror to Dropbox</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>FooterText</key>
<string>Lumin™ © 2011-2012 M. Zabetian & BitsOnTheGo.com. All rights reserved. Special Thanks to Tim Smith and AppliedDesign.tv.</string>
</dict>
<dict>
<key>Type</key>
<string>PSTitleValueSpecifier</string>
<key>DefaultValue</key>
<string>Unknown</string>
<key>Title</key>
<string>Version</string>
<key>Key</key>
<string>AppVersionStringKey</string>
</dict>
</array>
<key>StringsTable</key>
<string>Root</string>
</dict>
</plist>
答案 0 :(得分:1)
我已经解决了这个问题。我换了
Zabetian&amp; BitsOnTheGo.com
带
Zabetian和BitsOnTheGo.com
我不得不使用另一个文本编辑器,因为Xcode不会打开该文件,因为它声称它已损坏。在更换了&符之后,Xcode可以打开它,我可以构建并运行我的应用程序并查看完整的“设置”窗格。
不确定这是否算作Xcode中的错误。取决于“&amp;”是否合法和设置plist中的字符。不知道为什么不会。