Trying to setup Intercom with react-native, got it working well on Android, but stuck on iOS attempting to register users (breaks for both unidentified & identified register methods)
Tested a few different versions, all working as expected on Android, but still failing with same exception for iOS
- NPM Package: @intercom/intercom-react-native
- Tested v3.0.3 - v3.0.5
- iOS Package: Intercom (intercom/intercom-ios)
- Tested v12.0.0 - v12.4.3
- React Native (npm): react-native
- Tested: v0.66.x + v0.68.x + v0.70.x (latest)
Strange part is that it actually worked the very first time tested on iOS simulator using registerUnidentifiedUser() method, then started seeing this exception and now cannot get any version of Intercom.register** to work without throwing this same error (for any/all iOS developers & devices). We have implemented the Intercom.logout() method, and have used it trying to force reset/register again, but no luck. Please help!
Here is the full exception & trace for context:
Exception '+9Intercom registerUserWithUserId]: unrecognized selector sent to class 0x1036e8d20' was thrown while invoking registerIdentifiedUser on target IntercomModule with params (
{
email = "user@example.com";
userId = "abc-123";
},
2068,
2069
)
callstack: (
0 CoreFoundation 0x000000018040c304 __exceptionPreprocess + 172
1 libobjc.A.dylib 0x000000018005131c objc_exception_throw + 56
2 CoreFoundation 0x000000018041aebc __CFExceptionProem + 0
3 CoreFoundation 0x0000000180410204 ___forwarding___ + 1308
4 CoreFoundation 0x000000018041268c _CF_forwarding_prep_0 + 92
5 APP_NAME]] 0x00000001012a4844 -4IntercomModule registerIdentifiedUser:::] + 312
6 CoreFoundation 0x0000000180412840 __invoking___ + 144
7 CoreFoundation 0x000000018040fa24 -4NSInvocation invoke] + 276
8 CoreFoundation 0x000000018040fcbc -cNSInvocation invokeWithTarget:] + 60
9 APP_NAME]] 0x0000000101031f78 -8RCTModuleMethod invokeWithBridge:module:arguments:] + 1744
10 0 APP_NAME]] 0x0000000101035890 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicEiN12_GLOBAL__N_117SchedulingContextE + 1108
11 1 APP_NAME]] 0x0000000101035260 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 144
12 2 APP_NAME]] 0x00000001010351c4 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28
13 libdispatch.dylib 0x0000000180133fa4 _dispatch_call_block_and_release + 24
14 libdispatch.dylib 0x0000000180135768 _dispatch_client_callout + 16
15 libdispatch.dylib 0x000000018013d7f8 _dispatch_lane_serial_drain + 780
16 libdispatch.dylib 0x000000018013e43c _dispatch_lane_invoke + 392
17 libdispatch.dylib 0x000000018014a624 _dispatch_workloop_worker_thread + 772
18 libsystem_pthread.dylib 0x00000001ae55eb40 _pthread_wqthread + 284
19 libsystem_pthread.dylib 0x00000001ae55d904 start_wqthread + 8
)
RCTFatal
facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&, int, (anonymous namespace)::SchedulingContext)
facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const
invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_lane_serial_drain
_dispatch_lane_invoke
_dispatch_workloop_worker_thread
_pthread_wqthread
start_wqthread
To be clear, same error occurs for all tested versions (listed above), for any call to "register" methods (tried unidentified, identified with email, userId, and both)
Similar issues found during debugging: