my project have objective code and swift. i found this issue in objective-c class. how to solve this? Objective C

@property (nonatomic, weak) NSMutableDictionary *data;
 [data setValue:[NSNumber numberWithInt:3] forKey:@"status"];

it's work fine on swift4, Xcode 10.1 but it crash and got this error on swift 5, Xcode 11

* Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<_TtGCs26_SwiftDeferredNSDictionarySSP__$ 0x281131d70> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key status.' * First throw call stack: (0x21b520518 0x21a6fb9f8 0x21b43dec0 0x21bea5a00 0x102912e9c 0x102abd440 0x103c12050 0x1033dab34 0x103f208b8 0x108e3f63c 0x108df6e6c 0x10e21f6f0 0x10e220c74 0x10e22e6fc 0x21b4b1ec0 0x21b4acdf8 0x21b4ac354 0x21d6ac79c 0x24791fb68 0x1028aee4c 0x21af728e0) libc++abi.dylib: terminating with uncaugh

0

There are 0 best solutions below