Obj-C メソッドにデータを渡そうとするとエラーが発生します。
示されているコード、Obj-C:
RCT_EXPORT_METHOD(connect:(NSDictionary *) params) {
_connection = [_phone connect:params delegate:self];
}
js:
Twilio.connect({To: '+447842111281'});
問題は NSDictionary の処理に起因しますが、データに問題は見られません。任意の洞察をいただければ幸いです。
スタック トレースは次のとおりです。
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(
0 CoreFoundation 0x000000010d94f34b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010c4f921e objc_exception_throw + 48
2 CoreFoundation 0x000000010d865d8f -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 351
3 CoreFoundation 0x000000010d865bfb +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59
4 reactNativeRogChapTwilio 0x000000010b783107 -[TCConnectionInternal provideStats] + 1384
5 reactNativeRogChapTwilio 0x000000010b79fdb9 __21-[TCRTCMonitor start]_block_invoke + 70
6 libdispatch.dylib 0x00000001118e40cd _dispatch_client_callout + 8
7 libdispatch.dylib 0x00000001118c01c3 _dispatch_continuation_pop + 1091
8 libdispatch.dylib 0x00000001118d51e2 _dispatch_source_latch_and_call + 195
9 libdispatch.dylib 0x00000001118cdd7d _dispatch_source_invoke + 1098
10 libdispatch.dylib 0x00000001118c4b2e _dispatch_main_queue_callback_4CF + 1006
11 CoreFoundation 0x000000010d9134f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
12 CoreFoundation 0x000000010d8d8f8d __CFRunLoopRun + 2205
13 CoreFoundation 0x000000010d8d8494 CFRunLoopRunSpecific + 420
14 GraphicsServices 0x00000001132cda6f GSEventRunModal + 161
15 UIKit 0x000000010ff9df34 UIApplicationMain + 159
16 reactNativeRogChapTwilio 0x000000010b77d2ef main + 111
17 libdyld.dylib 0x000000011193068d start + 1
18 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException