Satimage Previous | Next
Compiler options and more settings
Home Documentation Smile Computing Working with external codes The XCode projects Compiler options and more settings  
Editing the compilation options

Xcode is a sophisticated software which provides access to numerous compilation options. This page describes how to access some of those options which may be not obvious for a beginner user of Xcode. The information here is as of the 2.2 version.

You need to edit the compilation options to activate or disable the debug symbols, and to change optimisation and configuration parameters.
There are two sets of parameters for a project.
  • The project's parameters. To view those, go in the left of Xcode's main window, select the project's name in the top of the source files list, and select File > Get info in the menu. This opens a window with several tabs: in the Build tab you will find the compilation options.
  • The target's parameters. To view those, select the destination folder in the Targets list located in the source files list, on the left in Xcode's main window. Then select File > Get info in the menu. This opens a window with several tabs: in the Build tab you will find the compilation options.
    The script which compiles the .sdef files into resource files is defined in the Rules tab.

    In the Properties tab you can change the settings for the Info.plist file:

    • the name of the executable, which has to be identical to the Product Name in the target's options of the project,
    • the CFBundleURL identifier of your product, which must be of the model com.satimage.sampleosax. This identifier identifies your product, for instance, if its code is involved in a crash, as reported in the Crash Logs (in ~/Library/Logs/CrashReporter/),
    • your product's version number,
    • and more parameters about the file produced.

Before you distribute your scriptable application or Scripting Addition
Once your code made scriptable, you may want to distribute it to other users. Before you do so, you may want to check the following.
  • the names and the 4-bytes codes that you have defined for your commands are specific to that product, they do not induce a conflict with another verb defined in AppleScript or in a standard Scripting Addition. If you change a 4-bytes code in the .sdef file, you must change in the source the routine which handles the AppleEvents, in order that it use the same new code.
  • your program does not leak. Check that with the MallocDebug application - included in Apple's Developer tools - (you must have compiled your application with the debug symbols on).
    If you observe that the program leaks (the used memory size increases regularly when you launch repeatedly similar AppleScript calls), you have probably forgotten to release some variables. Eventually, this will cause significant slow downs of your code and possible hard crashes.
  • the project is final: you compiled it with the debug symbols off, and with the adapted optimisation options - those which apply better to make your code faster.
Version française
Copyright ©2008 Paris, Satimage