Creating a new plugin project in Xcode
For the newbies among our fellow readers, here is a complete step by step walkthrough for creating a new plugin project in Apple Xcode. The screenshots show Xcode 4.5, but it works the same in any version of Xcode 4.
You start with just the standard folder structure, containing a “res” folder with your symbols, icons, and string tables, and a “source” folder, containing your C++ Sources (subfolders are – of course – possible).
Select the project (on the top of the source/_libs/Products tree), then select the project in the second column (do not select the target “cinema4dsdk”! ), then search for “product name” in the Build Settings.
Change the product name. This will determine the filename of the plugin binary.
Don’t worry about the filename under the “Products” folder on the left side not adapting to the new product name, that seems to be a bug that has been in Xcode since ages.
Click on the Scheme Selector on top of the Xcode window, just right beneath the Run and Stop buttons. Make sure you click on the left half of the Scheme Selector. From the menu that pops up, choose “Manage Schemes…”.
If there are any additional include directories where you have stored header files, you must add them to the project’s header search paths. Select the project from the center column (do not select the target “cinema4dsdk”!), then search for “header search” in the Build Settings. Double-click on the entry “Header Search Paths” to edit them.
A list dialog will pop up. To add a header search path, click the “+” button, and enter the path into the new list item (you can use absolute paths, or paths relative to the project location). If you also want subfolders to be searched for header files, choose “recursive” from the little selector on the right.
That should be it. Close the Xcode window to save the project (as there is no “Save Project” menu option in Xcode).
If you want to change build settings for your project, always select the project in the center column and not any of the targets. If you select the project, your changes will apply to the whole project including all targets. If you select a target, the changed setting will only apply to this specific target.