Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cmi2012

macrumors newbie
Original poster
Jul 10, 2012
4
0
I have a brand new MacBook Pro with a new download and install of xcode 4.3.3. When I start a new "Single View" iPad project and immediately try to run it with no modifications (iPad 5.1 Simulator), I get the following in the Target Output and this line in the main.m file is highlighted

Code:
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));

I am new to xcode but not programming. Since there are no modifications to the initial code, I assume there is something wrong with the installation or configuration of xcode? Any help would be appreciated!


Code:
*2012-07-10 08:25:34.569 cmi3[355:f803] *** Terminating app due to uncaught
exception 'NSUnknownKeyException', reason: '[<UIApplication 0x6868730>
setValue:forUndefinedKey:]: this class is not key value coding-compliant
for the key view.'*

**** First throw call stack:*

*(0x13c7022 0x1558cd6 0x13c6ee1 0x9bf022 0x930f6b 0x930edb 0x94bd50
0x23371a 0x13c8dea 0x13327f1 0x23226e 0x233eb7 0x10ce1 0x10ff8 0x1017f
0x1f183 0x1fc38 0x13634 0x12b1ef5 0x139b195 0x12ffff2 0x12fe8da 0x12fdd84
0x12fdc9b 0xfc65 0x11626 0x1d5d 0x1cc5)*

*terminate called throwing an exception**(lldb) *
 
Apparently there is a property in a XIB that is calling "view", so right click in the xibs on the window or VIew don't know what you have, look if something has the property "view", if it is like I think, it should have a yellow '!' next to it, to show you that it hasn't been found :)

Good luck.
 
Apparently there is a property in a XIB that is calling "view", so right click in the xibs on the window or VIew don't know what you have, look if something has the property "view", if it is like I think, it should have a yellow '!' next to it, to show you that it hasn't been found :)

Good luck.

I guess I am confused! This is an Out-Of-The-Box new project with no modification what so ever. How would there be a code error? I am new to Xcode so please bear with me! I only have one .xib file: ViewController.xib and when I click on it, I get the Interface Builder with no visible code. I have attached all code files for this project.
 

Attachments

  • Archive.zip
    27 KB · Views: 130
I found what was wrong.
In your 'iPad deployment info" the XIB was there at "Main Interface", I think you "accidently" filled that in or not? I'm not sure and not blaming you, but changing that should resolve the issue (change it to blank, because AppDelegate will do this for you.)
 
I found what was wrong.
In your 'iPad deployment info" the XIB was there at "Main Interface", I think you "accidently" filled that in or not? I'm not sure and not blaming you, but changing that should resolve the issue (change it to blank, because AppDelegate will do this for you.)

Now it's time to show what a newbie I am, how do I get to there? I do not remember changing anything and this error is recreated with every new project that I create. Thanks!
 
Now it's time to show what a newbie I am, how do I get to there? I do not remember changing anything and this error is recreated with every new project that I create. Thanks!

Found it! Thanks!
 
Newb as well

I had the same error as cmi2012 and followed jnoxx instructions and it works thanks for the input jnoxx! :D
 
I found what was wrong.
In your 'iPad deployment info" the XIB was there at "Main Interface", I think you "accidently" filled that in or not? I'm not sure and not blaming you, but changing that should resolve the issue (change it to blank, because AppDelegate will do this for you.)


I'm an experienced iOS developer, and I'm not sure what you are referring to.

Is the 'iPad deployment info' a setting in the plist? In target build settings? How do you get to it?

It's puzzling that the OP gets this problem on a brand new, blank project. I tried it (currently running Xcode 4.5, the beta) I don't have this problem.
 
I'm an experienced iOS developer, and I'm not sure what you are referring to.

Is the 'iPad deployment info' a setting in the plist? In target build settings? How do you get to it?

It's puzzling that the OP gets this problem on a brand new, blank project. I tried it (currently running Xcode 4.5, the beta) I don't have this problem.

Hey Duncan, I know you are an experienced developer, no doubt, hands down.
What I was referring to was the iPad deployment on your target
-> screenshot Screenshot
In older projects (I never had it since a while, so don't know what happened in OP's case), you had a Mainwindows.xib, it was trying to call it, but wasn't there.
Hope I made it more clear now.

----------

I had the same error as cmi2012 and followed jnoxx instructions and it works thanks for the input jnoxx! :D

No problem man, glad I could help ^_-
 
Hey Duncan, I know you are an experienced developer, no doubt, hands down.
What I was referring to was the iPad deployment on your target
-> screenshot Screenshot
In older projects (I never had it since a while, so don't know what happened in OP's case), you had a Mainwindows.xib, it was trying to call it, but wasn't there.
Hope I made it more clear now.

----------



No problem man, glad I could help ^_-

Thanks for the clarification.

Indeed, if you select the project in the leftmost column, then select the target, and select the "summary tab", there is an input box "Main interface". If you tap in that, it changes from blank to putting the name of a view controller "ViewController" in that box.

If you do that, the project then crashes on launch as the OP reported.

To get rid of the crash, you have to clear out that text, then click in the other input box to get it to save. Then running the project a second time doesn't crash any more.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.