04 Jan 2012, 20:50
Generic-user-small

Tomi Dufva (2 posts)

Thanks for the great book!

Im having some trouble with the program in lesson 3. I have checked the code many times and can’t find the reason.
Xcode builds it fine, but when the app launches in simulator it crashes and logs this:
@PRPFirstProjectTweeter[16469:10403] * Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key twitterWebView.’
  • First throw call stack:
    (0×1770052 0×1a42d0a 0×176ff11 0×9ee032 0×95ff7b 0×95feeb 0×97ad60 0×26d91a 0×1771e1a 0×16db821 0×26c46e 0×113e2c 0×1143a9 0×1145cb 0×74a73 0×74ce2 0×74ea8 0×7bd9a 0×2a0e 0×4c9d6 0×4d8a6 0×5c743 0×5d1f8 0×50aa9 0×217afa9 0×17441c5 0×16a9022 0×16a790a 0×16a6db4 0×16a6ccb 0×4d2a7 0×4ea9b 0×2738 0×2695)
    terminate called throwing an exceptionsharedlibrary apply-load-rules all
    Current language: auto; currently objective-c
    (gdb) @

So i’m thinking it has to do with the webview I deleted, but theres no reference that I can find everywhere about webview. in .xib file theres no loose connection, or at least I can’t find them…

Im guessing this is a noob mistake, but please, help me!

04 Jan 2012, 21:15
N614592285_2406_pragsmall

Chris Adamson (277 posts)

Diagnosing the possible broken connection:

  • Does PRPViewController.h define @property (nonatomic, strong) IBOutlet UIWebView *twitterWebView; ?
  • Does the .xib make that connection? To check, click PRPViewController.xib, click “File’s Owner”, and then bring up the connections inspector (cmd-opt-6). You should see a bubble called “twitterWebView” linked to a bubble that says “Web View”: http://img.ly/ciZT

Hope this helps narrow down the problem.

—Chris

04 Jan 2012, 22:04
Generic-user-small

Tomi Dufva (2 posts)

Thanks for the tips!

No there’s no mention of twitterWebView in PRPViewController header file, nor there is any connection or mentions in .xib. in connection inspector I only have the twitterTextView and then the buttons connected.

27 Sep 2012, 22:39
Me_square_pragsmall

Alex crouzen (2 posts)

I know this is raking up an old thread, but I’m actually running into this same error at the moment. I’ve started following the tutorial yesterday and this started happening after I removed the localisation features (I didn’t want to do the changes all over for the Dutch localised version I made) so could this have anything to do with that?

I’ve examined and searched through all files in the project and none of them contain a reference to ‘twitterWebView’, so there must be some reference in a cache somewhere I’m thinking.

Did this problem get solved somehow?

Alex.

28 Sep 2012, 18:08
Me_square_pragsmall

Alex crouzen (2 posts)

Ok, I (kinda?) solved it: I reset the iOS Simulator. Now whether this was due to some cached data in the simulator or the fact that it was still set to Dutch local settings I don’t know. I’d expect the non-English locale to be handled more gracefully, but it might not have been.

Anyway, that was it for me.

24 Nov 2012, 17:43
Generic-user-small

Xavier Ventura (1 post)

Thanks Alex. Resetting the iOS Simulator worked to me also.
I guess something went wrong when removing Localized UI versions.

29 Dec 2012, 00:54
Generic-user-small

Mdeh (6 posts)

I may have done the same. In the simulator, deleted the app from the simulator…which I assume is the same as reset.

  You must be logged in to comment