当我将新条目添加到我的设置包root.plist文件中,构建并运行应用程序时,新设置在应用程序中不可见。当然,我对新条目使用了唯一的键。
在我的xcode项目中的root.plist文件中,该文件显示了更改,但是当我通过管理器从iphone获取当前文件时,更改并不在那里。
我使用的是iOs 4.0.1。
BR,马丁
发布于 2010-08-01 14:27:24
Root.pList
<?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>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>iParkschein Einstellungen</string>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>Kennzeichen</string>
<key>Key</key>
<string>kennzeichen_preference</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<false/>
<key>KeyboardType</key>
<string>Alphabet</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>Stadt</string>
<key>Key</key>
<string>stadt_preference</string>
<key>DefaultValue</key>
<string>Wien</string>
<key>IsSecure</key>
<false/>
<key>KeyboardType</key>
<string>Alphabet</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Firmenrechnung</string>
<key>Key</key>
<string>firmenrechnung_preference</string>
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>Kennzeichen</string>
<key>Key</key>
<string>servicenummer_preference</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<false/>
<key>KeyboardType</key>
<string>Alphabet</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
</dict>
</array>
</dict>
</plist>如果我从用户默认设置中读取密钥并将它们写入控制台,我将获得除servicenummer_preference之外的任何密钥
BR,马丁
发布于 2010-08-01 10:13:29
删除并重新安装应用程序。有一个bug,当设备上已经存在应用程序时,可能无法安装更新的资源。
https://stackoverflow.com/questions/3380463
复制相似问题