Skip to main content
Answered

iOS SDK: Crash occurs when Intercom opens a deep link from Messenger


iOS SDK 10.0.3 (also reproduced in all next SDK versions), iOS 14+

I send a message that includes a deep link associated with app. The deep link opens normally by click on Intercom message notification, but I receive a crash when click the link on Intercom Messenger:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ICMPostViewController presentationContext]: unrecognized selector sent to instance 0x1194b6660'

The some rows from stack trace:

#6 0x00000001075cebc4 in -[ICMRootViewController closeIntercomModalWithCompletion:] at /Users/distiller/project/IntercomSDK/Classes/Presentation/Common/Windows/ICMRootViewController.m:368
 
#11 0x00000001873e2c98 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
 
#12 0x00000001075784b8 in +[ICMLinkOpener openCustomSchemeURL:] at /Users/distiller/project/IntercomSDK/Classes/Core/Link Handling/ICMLinkOpener.m:93

Could you help me to fix it?

 

Also I have a two different URL scheme for DEV and PROD applications. If I include two different URLs with both schemes, the Messenger opens a second (actually associated with another app) link, although the correct link does not open due to a crash. In other words, in development app associated with DEV schema URL causes crash, but PROD URL is opened in the production app. According to the documentation the PROD URL cannot be open:

"Linking to other apps is not supported with the iOS messenger. Your deep links must be for a scheme belonging to your app."

Is this behavior ok?

Best answer by Brian B11

Hi 👋

Thanks for your patience while we fixed this issue.

Its available in Release 11.1.2

Brian

View original
Did this topic help you find an answer to your question?

15 replies

Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • October 27, 2021

Hey @etaskun​, I'm going to open an issue with our engineers on this. Could I ask you to share the full stacktrace with me to help us diagnose this issue, please?


  • Author
  • New Participant
  • 1 reply
  • October 28, 2021

Hey Eric,

there are a stacktrace.


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • October 28, 2021

Thanks so much @etaskun​! I'll let you know as soon as I have an update.


  • Connector
  • 6 replies
  • January 10, 2022

Hi @eric f11​ ,

 

Is it possible to give any updates on how close you are to fixing this issue? I am currently migrating our app from react-native-intercom to @intercom/intercom-react-native and have run into this exact issue.


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • January 10, 2022

Hey @ben b11​, this issue is still open and I don't currently have any further updates to share.


  • Connector
  • 6 replies
  • January 10, 2022

Thanks for the quick response. 👍


  • New Participant
  • 1 reply
  • January 27, 2022

Hi

I have the same critical issue. When tapping on Deeplink our app crashing.

I tried the latest Intercom lib 11.1.0 but the issue still occur and reproducible 100%.

 

Any news when it will be fixed?

 

libc++abi: terminating with uncaught exception of type NSException
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/gena/Library/Developer/Xcode/DerivedData/Tonsser-hicchuuokirtbsdrxyqeuindtwqw/Build/Products/Dev-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/gena/Library/Developer/Xcode/DerivedData/Tonsser-hicchuuokirtbsdrxyqeuindtwqw/Build/Products/Dev-iphonesimulator:/Users/gena/Library/Developer/Xcode/DerivedData/Tonsser-hicchuuokirtbsdrxyqeuindtwqw/Build/Products/Dev-iphonesimulator/PackageFrameworks
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ICMPostViewController presentationContext]: unrecognized selector sent to instance 0x7fa54e8a4d50'
terminating with uncaught exception of type NSException

 


Brian B11
Intercom Team
Forum|alt.badge.img+2
  • Intercom Team
  • 40 replies
  • Answer
  • February 4, 2022

Hi 👋

Thanks for your patience while we fixed this issue.

Its available in Release 11.1.2

Brian


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • February 4, 2022

@genry​ @ben b11​ @etaskun​ 


  • Connector
  • 6 replies
  • February 7, 2022

@eric f11​ Thanks so much for having this fixed!

 

The project I work on uses React Native. Are you planning to update the React Native wrapper to include v. 11.1.2 of the iOS SDK any time soon?

 

I have currently made the fix work with React Native by "manually" updating `node_modules/@intercom/intercom-react-native/intercom-react-native.podspec` to use 11.1.2 instead of 11.0.0, which seems to work all right, but probably isn't the ideal solution. However, if your update to the React Native wrapper is far away, then I might just be able to live with it.


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • February 9, 2022

Hey @ben b11​, this change should be shipped later this week 😄


  • Connector
  • 6 replies
  • February 9, 2022

Perfect! Thank you so much! 🙂


  • Connector
  • 6 replies
  • February 11, 2022

@brian b11@eric f11​ I can see on your GitHub releases page that you have released 2.0.2 of the React Native SDK 🎉 . However, it doesn't seem to have been published to Yarn. Did someone forget to do this as part of the release process?


Brian B11
Intercom Team
Forum|alt.badge.img+2
  • Intercom Team
  • 40 replies
  • February 11, 2022

@ben b11​ Thanks for the heads up. The final publish step failed.

Fixed now so 2.0.2 is available now https://www.npmjs.com/package/@intercom/intercom-react-native/p>


  • Connector
  • 6 replies
  • February 11, 2022

Perfect, thank you.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings