Clone wiki

docbasedwindowcontrollersappxcodetemplate / Home

Installing By Hand

  1. If it doesn't already exist, create a directory at "~/Library/Application Support/Developer/Shared/Xcode/Project Templates/Application"
  2. Download an archive of the source or clone the repo.
  3. Copy the downloaded template directory to "~/Library/Application Support/Developer/Shared/Xcode/Project Templates/Application"
  4. Rename the copied template directory to something more humanly readable, e.g. "Document-based App with Window Controllers". The name you choose is what Xcode will use as the template's display name.
  5. Look for the installed project template to appear in Xcode's New Project dialog, under the User Templates -> Application source list item.

Install with a script

# Fetch and install script for the Source List Application Xcode project template
# 1. Download project template archive into /tmp 
# 2. Expand & rename
# 3. Move into personal Xcode project templates directory

INSTALL_DIR="${HOME}/Library/Application Support/Developer/Shared/Xcode/Project Templates/Application"
TEMPLATE_NAME="Document-based App with Window Controllers"

echo "Installing Xcode Project Template for ${TEMPLATE_NAME}"

if [ ! -d "${INSTALL_DIR}" ]; then
	echo "Making personal Xcode project templates directory..."
	mkdir -p "${INSTALL_DIR}"
	if [ $? > 0 ]; then
		echo "Can't make dir at ${INSTALL_DIR}"
		exit 1

echo "Changing directory to personal Xcode project templates directory"
cd /tmp

echo "Fetching gzip archive..."
curl --silent -O "${REPO_NAME}/get/tip.gz"

if [ -f tip.gz ]; then
	echo "Uncompressing project template"
	tar xf tip.gz

if [ -d "${REPO_NAME}" ]; then
	echo "Renaming template"

echo "Done."