[Preferences] Extend them with PList Editing
Hi Everyone,
I experimented a bit with the preferences application and especially the plists. If you go in the directory Applications/Preferences.app you will see a number of them. The plists are parsed by the preferences application. Depending on the content, the preferences are shown. This means, by changing the plists you can change the configuration and most importantly, add missing things. I started with the Keyboard.plist. When you open the file you find an entry like this:
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<integer>0</integer>
<key>defaults</key>
<string>com.apple.Preferences</string>
<key>key</key>
<string>KeyboardCapsLock</string>
<key>label</key>
<string>Enable Caps Lock</string>
</dict>
the cell defines the way the option is presented to you, in the example, a PSSwitchCell is a simple on/off switch. There are a number of other cells available. In the example, the value for the cell is read from and written to the KeyboardCapsLock variable. It is also possible to define a get and set function (which could be quite interesting)...
When you search for the term "KeyboardCapsLock" you will see that it is defined in a file named "UIKit" and that there is another quite interesting variable nearby called "KeyboardAutocorrection". So, by adding the following lines to your keyboard.plist:
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<integer>0</integer>
<key>defaults</key>
<string>com.apple.Preferences</string>
<key>key</key>
<string>KeyboardAutocorrection</string>
<key>label</key>
<string>Enable Autocorrection</string>
</dict>
and uploading the changed file to your iPhone, you can finally turn off the autocorrection function. This is nice if you typically type in a foreign language. I also scanned the other plists a bit. One extremely interesting one is Safari.plist, located in a bundle (however, called by the preferences application).
\System\Library\PreferenceBundles\MobileSafariSett ings.bundle
If you look inside and search for "WebKitJavaScriptEnabled" (one of the values of the file) you will see that it is defined in a file called WebKit that offers a large number of other possible interesting variables, for example "WebKitJavaEnabled" (hmmm...) WebKitDebug, WebKitLogLevel, WebKitDefaultFontSize and so on. I tried the same trick as described above but this time, unfortunately, my encoded plist was not correctly accepted by the iPhone (I don't know why)... I think that there is a binary version needed. So, if you have a mac and can do a binary version please try it, I would be interested to know.