Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Simple iPhone App with Swift Views and View Controllers IBOutlet

Bruno Paes Leme
Bruno Paes Leme
1,796 Points

Problem when running the App

After fallowing all the steps, when run the program and click on the button...: the app shows me the top_level_code, and highlights the line: class AppDelegate: UIResponder, UIApplicationDelegate {

Can anyone help me with that one?

Thank you.

Stone Preston
Stone Preston
42,016 Points

you probably have an exception being thrown, check the console for an error message and post what you find

Sonal Vajandar
Sonal Vajandar
2,003 Points

Hi Bruno, I am encountering the same error as you. Did you figure out how to get past this error?

Thanks,

Hi Bruno,

We could do with seeing what error is being shown in Xcode - can you copy the contents of the console, as Stone suggested?

Steve.

Elizabeth Aaltonen
Elizabeth Aaltonen
2,211 Points

I think i'm having the same problem. My exception is as follows:

2015-06-23 13:56:48.879 Fun Facts[4142:346714] -[Fun_Facts.ViewController showFunFact]: unrecognized selector sent to instance 0x7fe492c7cc90 2015-06-23 13:56:48.890 Fun Facts[4142:346714] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Fun_Facts.ViewController showFunFact]: unrecognized selector sent to instance 0x7fe492c7cc90' *** First throw call stack: ( 0 CoreFoundation 0x000000010c399c65 exceptionPreprocess + 165 1 libobjc.A.dylib 0x000000010df04bb7 objc_exception_throw + 45 2 CoreFoundation 0x000000010c3a10ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 3 CoreFoundation 0x000000010c2f713c ___forwarding_ + 988 4 CoreFoundation 0x000000010c2f6cd8 CF_forwarding_prep_0 + 120 5 UIKit 0x000000010cc39da2 -[UIApplication sendAction:to:from:forEvent:] + 75 6 UIKit 0x000000010cd4b54a -[UIControl _sendActionsForEvents:withEvent:] + 467 7 UIKit 0x000000010cd4a919 -[UIControl touchesEnded:withEvent:] + 522 8 UIKit 0x000000010cc86998 -[UIWindow _sendTouchesForEvent:] + 735 9 UIKit 0x000000010cc872c2 -[UIWindow sendEvent:] + 682 10 UIKit 0x000000010cc4d581 -[UIApplication sendEvent:] + 246 11 UIKit 0x000000010cc5ad1c _UIApplicationHandleEventFromQueueEvent + 18265 12 UIKit 0x000000010cc355dc _UIApplicationHandleEventQueue + 2066 13 CoreFoundation 0x000000010c2cd431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION_ + 17 14 CoreFoundation 0x000000010c2c32fd __CFRunLoopDoSources0 + 269 15 CoreFoundation 0x000000010c2c2934 __CFRunLoopRun + 868 16 CoreFoundation 0x000000010c2c2366 CFRunLoopRunSpecific + 470 17 GraphicsServices 0x0000000110380a3e GSEventRunModal + 161 18 UIKit 0x000000010cc38900 UIApplicationMain + 1282 19 Fun Facts 0x000000010c1a81f7 main + 135 20 libdyld.dylib 0x000000010e65c145 start + 1 21 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

Any ideas?

E

Elizabeth Aaltonen
Elizabeth Aaltonen
2,211 Points

I think i'm having the same problem. My exception is as follows:

2015-06-23 13:56:48.879 Fun Facts[4142:346714] -[Fun_Facts.ViewController showFunFact]: unrecognized selector sent to instance 0x7fe492c7cc90 2015-06-23 13:56:48.890 Fun Facts[4142:346714] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Fun_Facts.ViewController showFunFact]: unrecognized selector sent to instance 0x7fe492c7cc90' *** First throw call stack: ( 0 CoreFoundation 0x000000010c399c65 exceptionPreprocess + 165 1 libobjc.A.dylib 0x000000010df04bb7 objc_exception_throw + 45 2 CoreFoundation 0x000000010c3a10ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 3 CoreFoundation 0x000000010c2f713c ___forwarding_ + 988 4 CoreFoundation 0x000000010c2f6cd8 CF_forwarding_prep_0 + 120 5 UIKit 0x000000010cc39da2 -[UIApplication sendAction:to:from:forEvent:] + 75 6 UIKit 0x000000010cd4b54a -[UIControl _sendActionsForEvents:withEvent:] + 467 7 UIKit 0x000000010cd4a919 -[UIControl touchesEnded:withEvent:] + 522 8 UIKit 0x000000010cc86998 -[UIWindow _sendTouchesForEvent:] + 735 9 UIKit 0x000000010cc872c2 -[UIWindow sendEvent:] + 682 10 UIKit 0x000000010cc4d581 -[UIApplication sendEvent:] + 246 11 UIKit 0x000000010cc5ad1c _UIApplicationHandleEventFromQueueEvent + 18265 12 UIKit 0x000000010cc355dc _UIApplicationHandleEventQueue + 2066 13 CoreFoundation 0x000000010c2cd431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION_ + 17 14 CoreFoundation 0x000000010c2c32fd __CFRunLoopDoSources0 + 269 15 CoreFoundation 0x000000010c2c2934 __CFRunLoopRun + 868 16 CoreFoundation 0x000000010c2c2366 CFRunLoopRunSpecific + 470 17 GraphicsServices 0x0000000110380a3e GSEventRunModal + 161 18 UIKit 0x000000010cc38900 UIApplicationMain + 1282 19 Fun Facts 0x000000010c1a81f7 main + 135 20 libdyld.dylib 0x000000010e65c145 start + 1 21 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

Any ideas?

E