Creating Xcode project templates

From Mac Guides

Jump to: navigation, search

This guide explains how to create new project templates in Xcode. Project templates appear in the list of project types in the New Project dialog.

  1. Create a new project and setup everything as you'd like (NIB files, graphics, sounds, settings, code etc)
  2. Optionally, build and make sure the project works
  3. Use Finder and locate the project folder for your project you created in step 1
  4. Open another Finder window and navigate to /Library/Application Support/Apple/Developer Tools/Project Templates/. You have two options here:
    • Create a new folder for your custom project templates - this will appear as a category when creating a new project in XCode
    • Choose an already existing folder (eg Application) - this will place the project template in that category
  5. Open the new/chosen category folder and create a new folder inside. You can name this new folder whatever you like and it will appear as the project template name.
  6. Copy all files from the project folder in step 3 to the new template folder created in step 5. Note: If you built the project, delete the build folder from the template folder.
  7. Try to create a new project in Xcode. You should see your project template in one of the original categories or in the category you created, whichever you decided.