iOS RN app crashing with NSInvalidArgumentException

I am facing iOS app crash on app start, below is stack trace of crashed thread OS Version: iOS 18.3.2 (22D82) Report Version: 104

Exception Type: EXC_CRASH (SIGABRT) Crashed Thread: 28

Application Specific Information: *** -[__NSDictionaryM setObject:forKey:]: key cannot be nil

Thread 28 Crashed: 0 CoreFoundation 0x323b575fc <redacted> 1 libobjc.A.dylib 0x31e649244 objc_exception_throw 2 CoreFoundation 0x323b3f224 <redacted> 3 libloader 0x10651eba4 <redacted> 4 libloader 0x10653f3b4 <redacted> 5 libdispatch.dylib 0x3336a8248 <redacted> 6 libdispatch.dylib 0x3336a9fa8 <redacted> 7 libdispatch.dylib 0x3336b15cc <redacted> 8 libdispatch.dylib 0x3336b2124 <redacted> 9 libdispatch.dylib 0x3336bd38c <redacted> 10 libdispatch.dylib 0x3336bcbd8 <redacted> 11 libsystem_pthread.dylib 0x43965d680 _pthread_wqthread 12 libsystem_pthread.dylib 0x43965b474 start_wqthread

You're trying to save something into an NSDictionary for a key that's nil, which you can't do.

So:

NSString *key = nil;
// Cannot add that to an NSDictionary!
NSString *key = @"monkeys";
// Can save this

You need to figure out where you're doing it, and not do it.

iOS RN app crashing with NSInvalidArgumentException
 
 
Q