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 Structs As Data Models Structs or Classes

FactProvider-App crashing on Xcode 10.0

I am using Xcode 10.0. When I try to run the app and click on show another fact it crashes and shows up as a thread error. - Thread 1: SIGABRT

2018-09-26 04:30:11.385429+0200 FunFacts[26191:724695] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform. 2018-09-26 04:30:19.584926+0200 FunFacts[26191:724695] -[FunFacts.ViewController showFact:]: unrecognized selector sent to instance 0x7fc566517590 2018-09-26 04:30:19.592657+0200 FunFacts[26191:724695] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FunFacts.ViewController showFact:]: unrecognized selector sent to instance 0x7fc566517590'

What can i do to fix this?

2 Answers

Magnus Hållberg
Magnus Hållberg
17,232 Points

I'm guessing you are missing an @obj in front of the showFacts function called by a #selector.

Ok, I will try adding that. Thank you.