NSUnknownKeyException: this class is not key value coding-compliant for the key x
A storyboard/XIB has a connection to an outlet or action that no longer exists in the class (renamed or deleted), or the view’s custom class is wrong.
Seen on:
iOS
Meaning
Interface Builder stores outlet names. Renaming a property in code without reconnecting, or a wrong Custom Class/Module in the Identity inspector, triggers this when the view loads.
Common causes
- Outlet renamed/deleted in code but still connected in IB
- Wrong Custom Class on the view controller/view
- Module not set (Inherit Module From Target)
⚡ Quick fix
- Open the storyboard, right-click the view controller and delete the broken (⚠️) connection
- Check the Custom Class and Module in the Identity inspector
- Reconnect the outlet
Detailed fix by platform
Xcode
# Storyboard → select view controller → Connections inspector → remove outlets marked with "!"
How to diagnose
- Key — Name in the message
- Class — Identity inspector Custom Class
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- ATS App Transport Security has blocked a cleartext HTTP resource load
- built for iOS, linking for simulator Building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
- integrity could not be verified Unable to Install "App": This app cannot be installed because its integrity could not be verified
Most viewed in iOS
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026