尝试使用react-native在ios上安装“@intercom/intercom-react-native”时出错

Dio*_*aia 3 ios react-native intercom

我按照文档https://developers.intercom.com/installing-intercom/docs/react-native-installation中的方式进行了安装,但是当我运行 pod install 命令时,出现以下错误:

\n
\xe2\x9e\x9c  ios git:(master) \xe2\x9c\x97 pod install \nUsing Expo modules\nAuto-linking React Native module for target `intercomexpo`: intercom-react-native\nAnalyzing dependencies\n[!] CocoaPods could not find compatible versions for pod "intercom-react-native":\n  In Podfile:\n    intercom-react-native (from `../node_modules/@intercom/intercom-react-native`)\n\nSpecs satisfying the `intercom-react-native (from `../node_modules/@intercom/intercom-react-native`)` dependency were found, but they required a higher minimum deployment target.\n
Run Code Online (Sandbox Code Playgroud)\n

nei*_*lco 6

最新版本@intercom/intercom-react-native(撰写本文时为2.0.1版)需要 iOS 13 或更高版本。

在此输入图像描述

如果 React Native 应用程序中的 iOS 项目将其部署目标设置为iOS 13.0 以下的任何版本,则在运行时会收到以下错误pod install

[!] CocoaPods could not find compatible versions for pod "intercom-react-native"
Run Code Online (Sandbox Code Playgroud)

解决方案是回退到以前的版本。

如果使用 NPM:

npm install @intercom/intercom-react-native@1.1.1
Run Code Online (Sandbox Code Playgroud)

如果使用纱线:

yarn add @intercom/intercom-react-native@1.1.1
Run Code Online (Sandbox Code Playgroud)