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,216 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.