Jamoma API  0.6.0.a19
Appendix: OSX development using Xcode
Trond Lossius, Tim Place, Nathan Wolek

Setting up a new Xcode projct

Jamoma use make to build libraries, extentions and implementations. As such, Xcode is not really needed in development of Jamoma for the OSX platform. Still, Xcode is a nice IDE. In order to set up an Xcode project for a new librarty or extention, follow these steps. The first part is to make sure that we have a working project that compiles using make.

  1. Set up the yaml file declaring what files and folders are to be included in the project
  2. Run the build.rb script from Terminal.app. This creates or updates the make file accordingly.

Now the accompanying Xcode project can be set up:

  1. In Xcode, Choose File > New > Project....
  2. Choose "External Bild System" and click "Next".
  3. Provide the name of the library as Product Name, and choose the appropriate folder. E.g. an Xcode project for the EffectsLib will be "EffectsLib", and should be saved to the Core/DSP/Extentions/EffectsLib folder.
  4. Close the project.
  5. In Finder, the project will have been created in a subfolder of the specified in the previous step. E.g. the Xcode project for EffectsLib will have been created as the (new) folder Core/DSP/Extentions/EffectsLib/EffectsLib/EffectsLib.xcodeproj. Move the Xcode project one folder up, and trash the folder that was created in the previous step (Core/DSP/Extentions/EffectsLib/EffectsLib/).
  6. Open the Xcode project, and add the files and folders you want to have access to in the IDE. You can create folder references for ay added folders, but do not add folders or files to any targets.

Accessing Doxygen documentation in Xcode

Xcode 5 added support for dynamical access to Doxygen documentation. The main features are outlined in the following StackOverflow post:


Debugging using Xcode

When building projects within Jamoma Core, unit tests are run as part of the build process. If the test fails, the project will report that it has failed to build, as outlined in the chapter on Unit Testing.

However, if the test crashes, the building and testing is not of much help. Instead we need to add a separate debug scheme in Xcode:

  1. Start by creating a new target with the External Build System option
  2. For this new target, change the Info > Arguments from the default to "notest"
  3. Build the library
  4. Next create a new scheme for the project and edit it
  5. For this new scheme's settings, change the Run > Info > Executable from the default of None to choose either the compiled test32 or test64 which should be located in the project's build folder

This should allow you to run the test, apply breakpoints and use the other debugging features in Xcode. For now, we should make sure that this setup is not committed to the repository, because it would defeat the purpose of integrating the build and test. We want these to remain linked so that we discover bugs as soon as possible.