A book described the following steps for a project without any Interface Builder files:
- After creating a Single View Application, delete the
.xibfile - Find the
ProjectName-Info.plistfile and remove theMain nib file base nameproperty. (select it and press Delete) - Find
main.mand change the last argument forUIApplicationMainto@"ProjectNameAppDelegate" - remove a
@propertyline inProjectNameAppDelegate.hand@synthesizeinProjectNameAppDelegate.m
I can’t find (2) above for the property, and since I am using Xcode 4.3.2, the ProjectNameAppDelegate.h has become AppDelegate.h (the .m as well)… I also see a window and viewController properties there… and doesn’t look like they need to be removed as in step 4. How can it be done if it is Xcode 4.3.2 (or later?)
If you want to create a project with a clean slate, Xcode provides a template called Empty Application.
The standard templates don’t include a main window nib any more, so the change in #2 is not necessary. You should make sure you don’t enable storyboards when you create your project though.
Yes, the application delegate is just called
AppDelegatenow. It’s just a name. It doesn’t matter.Edit:
Steps to create an iPhone application with a view controller from an empty application template:
UIViewController.AppDelegate.hto import your view controller header.application:didFinishLaunchingWithOptions:to instantiate your view controller, assign it to the instance variable, and add its view as a subview to the window.