iosxcodereact-nativeintercom

Apple Mach-O Linker Error - Undefined symbols for architecture x86_64: "_UISceneWillEnterForegroundNotification" and "___isPlatformVersionAtLeast"


I am using https://github.com/tinycreative/react-native-intercom and went through the installation there and https://developers.intercom.com/installing-intercom/docs/ios-installation

This worked fine for a while and just started all of a sudden.

enter image description here

  "_UISceneWillEnterForegroundNotification", referenced from:
      +[ICMBridge load] in Intercom(ICMBridge.o)
  "___isPlatformVersionAtLeast", referenced from:
      -[IntercomSDK_IntercomConversationCollectionViewController insetsForAccessoryView] in Intercom(IntercomConversationCollectionViewController.o)
      +[IntercomSDK_ITBUpload createUploadForMediaAsset:completion:] in Intercom(ITBUpload.o)
      +[IntercomSDK_ITBUpload processImageDataForUpload:mediaAsset:info:imageUploadDataUTI:completion:] in Intercom(ITBUpload.o)
      -[IntercomSDK_IIMInputAccessoryView createConstraints] in Intercom(IIMInputAccessoryView.o)
      -[IntercomSDK_IIMInputButtonContainerView createConstraints] in Intercom(IIMInputButtonContainerView.o)
      -[IntercomSDK_IIMMediaViewController updateCollectionViewContentInsets] in Intercom(IIMMediaViewController.o)
      -[IntercomSDK_IIMMediaViewController layoutExpandButton] in Intercom(IIMMediaViewController.o)
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Solution

  • On 12-09-2019, Intercom released sdk version 5.5.0, which supports iOS 13.

    https://github.com/intercom/intercom-ios/releases/tag/5.5.0

    UISceneWillEnterForegroundNotification and isPlatformVersionAtLeast are in iOS SDK 13, so would require Xcode 11 beta. I think you are getting the error because you are using an earlier Xcode version like Xcode 10.3 etc.

    Ideally Intercom should have conditionally supported iOS 13 stuff so that the code wouldn't have broken on iOS sdk versions earlier than 13.0