On iPhone X app crashes for the reason 'NSUnknownKeyException', reason: '[<UIStatusBar_Modern

270 Views Asked by At

My app has a storyboard and it built in Objective C. This app works fine on all other devices but only for iPhone x it crashes for the reason:

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIStatusBar_Modern 0x7fcc73e0d680> valueForUndefinedKey:]: this class is not key value coding-compliant for the key foregroundview.'

I tried all the solutions I found but yet no result.

1

There are 1 best solutions below

0
On

This exception is often appears when you connect your view to some property and then, rename (for example from foregroundview to foregroundView) that property or remove it. Try using search by foregroundview in your project. And check if there's any result in your storyboard. And when find one - break the connection and create new one to the correct outlet if it's needed