Chapter 9
A few Xcode 4 points worth noting for the .plists.
1. When creating the Settings.bundle the type of Root.plist will be set to iPhone Settings plist by default.
2. When making the ChildPane .plist there is no longer a Main Menu item View>Property List Type option (that I could find), selecting the file in the Project Navigator and right-clicking in the editor area (not on the file name) will present a context menu with one of the options Property List Type so it can be set in this manner.
3. When adding Preference Items by selecting an existing Item and hitting return (or clicking the plus sign in the Preference Items row) by default a Textfield Item is created. A checklist of the various options appears in the Key column, with the TextField checked. Attempting to change the type, to Group for example as in the project, from this checklist causes Xcode to open an Alert Panel warning of an internal error, and with the option of crashing or continuing in a inconsistent state. The type can be changed successfully by opening the disclosure triangle and changing the type in the Value column. this will then be reflected in the Key column Item row.
4. The BankAccount.plist as created does not end up in the Settings.bundle, so it will not be found in the path as written in the -bundleSettings method. In Xcode I have not found a way to place the file into the Settings.bundle, but it can be placed there manually in the project directory by selecting Settings.bundle, right-clicking and choosing Show Package Contents and dragging the file in. If the project is open you will get a warning that the file is missing from its previous location. When asked to re-save it, you should choose not to.
As mentioned in a previous post, the layout of the .plist editor in Xcode 4 has a different appearance and so certain things do not match up with the figures in the book. Fortunately, it is relatively easy to work out the differences.
Bob
|