Apple Mach-O链接器错误-体系结构x86_64的未定义符号:“ _ UISceneWillEnterForegroundNotification”和“ ___isPlatformVersionAtLeast”

Bra*_*sky 5 xcode ios react-native intercom

我正在使用https://github.com/tinycreative/react-native-intercom并在那里进行安装和https://developers.intercom.com/installing-intercom/docs/ios-installation

这工作了好一阵子,然后突然开始了。

在此处输入图片说明

  "_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)
Run Code Online (Sandbox Code Playgroud)

小智 10

在2019年12月9日,对讲机发布了SDK版本5.5.0,该版本支持iOS 13。

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

UISceneWillEnterForegroundNotification并且isPlatformVersionAtLeast在iOS SDK 13中使用,因此需要Xcode 11 beta。我认为您收到此错误是因为您使用的是Xcode 10.3等早期版本的Xcode。

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

  • 谢谢!`pod'Intercom','〜> 5.4.1'`确实解决了问题。向对讲机的人员发送了便条,也许他们会注意的。 (3认同)