Looking for some help here. We have a ConnectIQ app out that is frequently crashing when calling the sendMessage function from the iOS SDK (v1.3). It is terminating with the following error:
Fatal Exception: NSInvalidArgumentException. *** -[__NSDictionaryM setObject:forKeyedSubscript:]: key cannot be nilHere is the relevant stack trace:
...
10 libc++abi.dylib 0x183b4054c std::__terminate(void (*)()) + 16
11 libc++abi.dylib 0x183b3fea8 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 134
12 libobjc.A.dylib 0x183b5065c _objc_exception_destructor(void*) + 362
13 CoreFoundation 0x18489fc9c _CFArgv + 110
14 CoreFoundation 0x184944c3c -[__NSDictionaryM setObject:forKeyedSubscript:] + 940
15 ConnectIQ 0x105cec684 -[IQTaskManager getTasksForDevice:] + 268
16 ConnectIQ 0x105cec1c8 -[IQTaskManager queueTask:forceStart:] + 88
17 ConnectIQ 0x105ceac58 -[IQTaskManager sendMessage:toApp:progress:completion:] + 276
18 ConnectIQ 0x105cf1dd0 -[ConnectIQ sendMessage:toApp:progress:completion:] + 148
19 MyApp 0x104d94938 GarminConnectManager.sendMessage(Any) -> () (GarminConnectManager.swift:133)
We're having trouble reproducing the issue, which we thought might be because some `nil` values are being passed as values in dictionaries or arrays, but that does not cause a crash upon testing. We've also tried testing that the IQDevice's UUIDs are not `nil` for the IQApp we are sending the message to with no luck. We are passing only the specified NSString, NSNumber, NSNull, NSArray, or NSDictionary that the docs request. The app is written in Swift if that relevant.
Would love if anyone has any ideas or suggestions to try! Thanks!