1

In an attempt to convert an iPhone app to a universal app, I added a MyViewController~ipad.xib to my project. I also set the Targeted Device Family to iPhone/iPad. I then attempted to undo those changes--deleted the MyViewController~ipad.xib and set Targeted Device Family to iPhone only.

Now, I can run on iPhone (as always), but not on iPad (which I could do before). I now crash with the following error:

"'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "MyViewController" nib but the view outlet was not set.'"

The view outlet in MyViewController.xib is set: Showing view outlet set to 'View'

And File's Owner class is set: Showing File's Owner class set to 'MyViewController'

So I would like to just get back to what I had... an iPhone-only app that will run on the iPad (but in the smaller iPhone view). Any help would be appreciated!

Levon
  • 138,105
  • 33
  • 200
  • 191
Hap
  • 556
  • 1
  • 6
  • 20

1 Answers1

5

Be aware that if you remove files from your project, the files are not deleted from the device when re-installing (through Build&Run), and iOS will still see your old files there. You may need to manually remove the app from the device, then re-install.

Another option is to rename the file, so that old files will not bother you.

Also, cleaning the project, or cleaning the build folder (keep alt pressed and select Clean from the Product menu) may help.

mvds
  • 45,755
  • 8
  • 102
  • 111
  • I should have said... I am running these in the emulator. – Hap Jun 04 '12 at 18:23
  • I had to manually remove the simulator files. That cleared up the issue. Thanks, mvds. – Hap Jun 04 '12 at 19:07
  • @Hap great! Just a tip in case you didn't know already, you can remove apps from the simulator exactly like on a real device: quit the (simulated) app using the home button, long press and delete app. – mvds Jun 05 '12 at 16:25
  • Good to know. Seems like I tried that in the past and the files did not get deleted. They do now, as you stated.. thanks! – Hap Jun 05 '12 at 19:02