Missing "Empty Application" in Xcode 6.3.1 (SOLUTION)

#1

So I started Chapter 4 today and realized that the latest version of Xcode does not have the “Empty Application” choice that the book tells you to create your new project with. There were a lot of solutions but I thought it might be useful if there is a thread simply devoted to a solution to this problem within the BNR website. So without further hesitation, here is what worked for me (and should work for you too!). Namely, this is how to create a new template that will show up as an option when you create a new project:

Step 1. Open the package contents of the Xcode application and navigate to the following location:
(Xcode.app)/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/iOS/Application/

Step 2. Create a new folder in this location and name it “Empty Application.xctemplate”.

Step 3. Create a new file within the folder you just made and name it “templateinfo.plist”.

Step 4. Copy and paste the following code snippet in the file you just created (“templateinfo.plist”):

[code]<?xml version="1.0" encoding="UTF-8"?>

Kind Xcode.Xcode3.ProjectTemplateUnitKind Identifier com.apple.dt.unit.emptyApplication Ancestors com.apple.dt.unit.cocoaTouchApplicationBase com.apple.dt.unit.coreDataCocoaTouchApplication Concrete Description This template provides a starting point for any application. It provides just an application delegate and a window. Options Identifier languageChoice Units Objective-C Definitions AppDelegate.m:implementation:methods:applicationdidFinishLaunchingWithOptions:body self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. self.window.backgroundColor = [UIColor whiteColor]; AppDelegate.m:implementation:methods:applicationdidFinishLaunchingWithOptions:return [self.window makeKeyAndVisible]; return YES; Swift Definitions AppDelegate.swift:implementation:methods:applicationdidFinishLaunchingWithOptions:body self.window = UIWindow(frame: UIScreen.mainScreen().bounds) // Override point for customization after application launch. self.window!.backgroundColor = UIColor.whiteColor() AppDelegate.swift:implementation:methods:applicationdidFinishLaunchingWithOptions:return self.window!.makeKeyAndVisible() return true [/code]

Step 5. Download “TemplateIcon.tiff” and place it in the “Empty Application.xctemplate” folder you created in step 1.
(This will be the icon displayed above your “Empty Application” project template).

Step 6. Restart Xcode.

Note: In the book, they tell you to use “SomeName” for the product name and “BNR” for the Class Prefix. There will be no input field for “Class Prefix” in your new template, but thats OK! When you open a new “Empty Application” template, ADD THE PREFIX BEFORE THE PRODUCT NAME (NO SPACES). (You will get the same exact results.)