Moon Travel Planner: Modifying and Using Properties
There are a few properties that you should set for your application
to configure it properly for the Finder and the operating system.
These include the bundle identifier (CFBundleIdentifier
)
and the application’s creator code (CFBundleSignature
).
There are other properties you need to set so you can display version
and copyright information to the user. You’ll set these properties,
then create an About window that accesses the property
list from within your application.
Besides modifying the property list, there are a number of steps you’ll need to follow to actually create the window and get it to function in the Moon Travel Planner we’ve worked on so far. In this section you’ll:
Modify the property list.
Create a new window.
Write code that opens and displays the About window.
Write an event handler for the About window.
Modify the Property List
You’ll set the bundle identifier first. The bundle identifier
is used to locate the application bundle at runtime (see Section 10.1.1).”
It must be unique, so define it as a Java-style package name; for
example com.mycompany.myapp
or edu.ABCSchool.myapp
.
Open the Moon Travel Planner project if it is not already open.
Click the Targets tab, then click Moon Travel Planner in the Targets list.
Click Application Settings, then click Expert.
Click New Sibling, type
CFBundleIdentifier
as the property name, and press Return.Double-click the Value column, type
com.apple.moontravelapp
as the property ...
Get Learning Carbon now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.