Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "Main Interface" in Xcode actually *do*?

I'm moving some older projects to Xcode 4.5, and I'm a bit baffled as to the actual function of the Main Interface project dropdown. What does the framework actually do with that value?

like image 469
Christophe Avatar asked Jan 20 '13 01:01

Christophe


1 Answers

beware if you have a storyboard based project. Editing the MAIN INTERFACE field manually is dangerous. If storyboard is not found it thinks you mean a NIB. will change the app to a NIB based project. Safer to choose a storyboard from the drop down.

BEFORE - i has a storyboard based project
UIMainStoryboardFile~ipad : Main_iPad
UIMainStoryboardFile      : Main_iPhone

I mistype the name in MAIN INTERFACE field to Main_iPhone1 I ran the app and it crashed as Main_iPhone1.storyboard doesnt exist I changed it back to Main_iPhone but project refused to build even after a lot of cleaning.

Casued by the key in the plist also changing along with the value

AFTER
UIMainStoryboardFile : Main_iPad
NSMainNibFile          : Main_iPhone1  <<project changes to NIB based

Changing Main_iPhone1 back to Main_iPhone only changed it from Main_iPhone1.xib to Main_iPhone.xib which doesnt exist and also crashes.

like image 173
brian.clear Avatar answered Sep 23 '22 18:09

brian.clear