Universal apple app

Apple insists Universal app must be the same package for both iPad and iPhone, which means it’s the same binary for both, can’t be compiling the same source code to 2 different binaries as I thought.

The project layout looks like this:

Common data can be put into share folder. At first I thought this universal app can use the same .h and .m file both iPad and iPhone, the only different h and m file might be those two AppDelegates, all other h and m file should be same and shared by iPad and iPhone? nib file for different platform can follow the naming convention, MyViewController~ipad.nib and MyViewController~iphone.nib.


Instead of drag UI controls to file owner to link them to IBOutlet/IBAction, they need to drag to app delegate in universal app to allow IBOutlet/IBAction to popup. The reason? I should create IBOutlet/IBAction in rootUIViewController (the owner of the default mainWindow.nib) but I couldn’t find it, so I did it right in the app delegate.

Suddenly, my iPad simulator turns to dark, same thing happened two days in a row, google search indicates I should turn the visibility of mainwindow.xib to true, but the one in iPhone doesn’t need to, whyyyyy?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s