React Native crashes (iOS, setDeviceToken method) | Community
Skip to main content
Answer

React Native crashes (iOS, setDeviceToken method)

  • November 3, 2021
  • 8 replies
  • 167 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

Best answer by Paul Y

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.

8 replies

Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • November 8, 2021

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.


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • November 8, 2021

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


  • Author
  • New Participant
  • November 8, 2021

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


  • Author
  • New Participant
  • November 13, 2021

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


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • November 15, 2021

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


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • November 15, 2021

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


  • Author
  • New Participant
  • Answer
  • November 15, 2021

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.


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • November 15, 2021

No worries, let me know how it goes!