如果应用程序已通过 xcode 重新安装,则所有保留的设置都会被清除。如何避免这种行为?
更详细:已经安装了一个应用程序,然后我对设置(设置包)进行了更改并存储了它们。在我通过 xcode 重新安装了应用程序(我没有删除应用程序)并且我之前所做的所有设置都已清理之后。我想在安装应用程序后保留我的设置,或者可能有另一种方法在安装后保留应用程序的设置。
例子:
我创建了设置包(文件->新建->文件->资源->设置包)
更改了 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>Server</string> </dict> <dict> <key>Type</key> <string>PSTextFieldSpecifier</string> <key>Title</key> <string>Address</string> <key>Key</key> <string>server_address_preference</string> <key>KeyboardType</key> <string>Alphabet</string> <key>IsSecure</key> <false/> <key>AutocapitalizationType</key> <string>None</string> <key>AutocorrectionType</key> <string>No</string> </dict> </array>