调试时缺少 Root.plist 应用程序设置
我创建了一个设置包和 Root.plist。当我使用 Release|iPhoneSimulator 构建运行我的应用程序时,我可以按照预期在“设置应用程序”中查看和编辑我的设置。
但是,当我在调试|iPhoneSimulation 模式下运行我的应用程序时,我的设置消失并被调试器设置取代。有没有办法在调试时保持原始 Root.plist 设置不变?
我一定是做了一些愚蠢的事情,因为我找不到任何其他有此问题的人的参考资料。
谢谢。
I have created a settings bundle and Root.plist. When I run my app using the Release|iPhoneSimulator build I can see and edit my settings in the "Settings app" just fine, as expected.
However when I run my app in Debug|iPhoneSimulation mode my settings are gone and replaced by the Debugger Settings. Is there a way to keep my original Root.plist settings intack while debugging??
I must be doing something stupid because I can't find any references to anyone else having this problem.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这可能是区分大小写的问题。
如果 MonoDevelop 发现项目中标记为 Content 的名为 Settings.bundle/Root.plist 的文件,则 MonoDevelop 会将调试设置合并到您的设置文件中,但此检查区分大小写。
如果它没有找到这个文件 - 例如你的设置文件大小写不同 - MD 将简单地创建一个新的设置文件,但 Apple 不区分大小写的文件系统会认为文件名是相同的,所以它最终会覆盖你的文件名在应用程序包中。
It might be a case sensitivity issue.
MonoDevelop merges the debug settings into your settings files, if it finds a file called Settings.bundle/Root.plist marked as Content in the project, but this check is case sensitive.
If it does not find this file - for example your settings file is cased differently - MD will simply create a new settings file, but the Apple case-insensitive filesystem will consider the filenames to be the same, so it'll end up overwriting yours in the app bundle.
看起来我用来弄清楚如何做到这一点的示例是假的。
为了解决这个问题,我删除了 Root.plist,然后通过执行“添加..新文件...属性列表”重新添加它。一旦我将自定义设置添加到这个 plist 中,一切就开始工作了。
因此,如果您看到示例(例如此示例,http://conceptdev.blogspot。 com/2009/08/monotouch-settingsbundle.html),他们告诉您手动创建一个 xml 文件,然后将其重命名为 Root.plist,不要这样做。这不起作用。
Looks like the examples I've been using to figure out how to do this are bogus.
To resolve the issue I deleted the Root.plist and then re-added it by doing a Add..New File...Property List. Once I added my custom settings to this plist everything started working.
So if you see examples (such as this one, http://conceptdev.blogspot.com/2009/08/monotouch-settingsbundle.html) where they are telling you to manually create an xml file and then rename it to Root.plist, don't do this. It doesn't work.