UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Solved: NSUnknownKeyException?

Forums > iOS

Uh- so second question in one day, but I'm getting this error whenever I tap on a button in my app: 2020-07-21 11:16:55.487080-0400 TOTL[30898:13825525] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<TOTL.ViewController 0x7fcc6a30a140> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key facebookTapped.'

I've tried googling this and it seems people have had the problem before, but either I don't understand the solution whatsoever, or the solution they present doesn't work for me. Any ideas? Again, I'm a beginner, so apologies if I don't understand everything as much as I should.

3      

This is likely missing @IBAction in your view controller class that is defined in Storyboard somewhere as action for button.

3      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.