Skip to main content
Answered

React Native crashes (iOS, setDeviceToken method)

  • 3 November 2021
  • 8 replies
  • 136 views

Hello! After we started using Intercom we got an increase in random crashes. According to Xcode logs, the app crashed randomly when sendTokenToIntercom is called.

I found two similar problems:

https://forum.intercom.com/s/feed/0D52G0000597Qc9SAE/p>

https://forum.intercom.com/s/question/0D52G00004hzX8fSAE/ios-sdk-setdevicetoken-method-crash/p>

 

As well, there is a workaround for IOS SDK:

I can recommend a workaround; namely, switching to manually handling push notifications, as outlined in Step 4 of our guide here. @eric f11​ 

 

Can this workaround be used for RN? Is there any description of how to implement it?

 

Thanks,

Stan

8 replies

Userlevel 1

Hey @paul y​, I'm looking into this with our mobile engineers and I'll let you know as soon as I have a reply.

Userlevel 1

Hey again @paul y​, you'll need to upgrade to the latest version of our React Native SDK to resolve this issue.

Hi @eric f11​, sounds great, you made my day! Thank you very much.

Hi @eric f11​. We released a new version, but I still see these crashes...

Podfile.lock

 - Intercom (10.3.2)

 - intercom-react-native (1.1.1):

  - Intercom (~> 10.3.0)

 

yarn.lock

"@intercom/intercom-react-native@^1.1.1":

 version "1.1.1"

Screenshot 2021-11-13 at 17.26.14

Userlevel 1

Hey @paul y​, let me check in with our engineers on this one for you.

Userlevel 1

Hi @paul y​, this is an issue affecting some customers but a workaround is available; namely, manually implementing push notification handling, as outlined here.

Thanks. I implemented a fix that you described here: https://forum.intercom.com/s/question/0D52G00004hzX8fSAE/ios-sdk-setdevicetoken-method-crash

I'm not sure if it helped, we just released it. We'll be waiting for updates from you, thanks.

Userlevel 1

No worries, let me know how it goes!

Reply