Search code examples
xcodetemplatesproject

What do I need to know to create Xcode project templates?


I know some of the tutorials for creating Xcode project templates, for example this one here: http://robnapier.net/blog/project-templates-364

This is the best one I could find. All others basically repeat the same info, or are no longer up to date, or worse tell me that even they don't know what they're doing. Possibly useful tools that are linked to here and in other places are no longer available.

I keep running into roadblocks, and would like to gather as much information as possible on the process of creating Xcode project templates. Info that is most importantly up to date (at least it must be relevant for Xcode 3 or higher).

For example, what I'd like to see is:

  • a description of the TemplateChooser.plist and similar plist files and what these options do (in my case, once I add a TemplateChooser.plist, my project disappears from the Xcode project template list)
  • how to create a project template that references another .xcodeproj (when I do that, the other .xcodeproj appears in the project template list even though it doesn't use the special naming convention)
  • processes that can be applied, for example is it possible to run a script during the creating of a project from a template? This would be useful to unzip certain files into the newly created project.

If you have the answer or suggestions to any of the issues above, I'd appreciate that. Otherwise any link to good Xcode project template resources would be highly recommended. Especially if there is an official documentation from Apple - I haven't found one yet which seems to imply that project templates are undocumented.


Solution

  • There is indeed little XCode template info out there. What I have found of interest are the following links (I documented myself on the topic, but haven't yet gone any further):

    • a Google Code search reveals a few examples, but not much
    • in particular, I found interesting to look at the code provided by Three20; they have some basic examples, like here
    • referencing another project worked for me, so maybe you could open a specific question about that giving more details?
    • there is information scattered on the Apple mailing-lists
    • there is no official documentation from Apple, as is evidenced by the lack of results to this query

    I'm sorry if this is not a Enlighting, concise answer. As you said, it's not well documented, and sources are all over the place. I just hope I could highlight some places to find information that your own searches might not have reached :)