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

Error trying to install "@intercom/intercom-react-native" on ios using react-native

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

➜  ios git:(master) ✗ pod install 
Using Expo modules
Auto-linking React Native module for target `intercomexpo`: intercom-react-native
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "intercom-react-native":
  In Podfile:
    intercom-react-native (from `../node_modules/@intercom/intercom-react-native`)

Specs satisfying the `intercom-react-native (from `../node_modules/@intercom/intercom-react-native`)` dependency were found, but they required a higher minimum deployment target.

@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"

解决方法是回退到之前的版本。

如果使用 NPM:

npm install @intercom/intercom-react-native@1.1.1

如果使用纱线:

yarn add @intercom/intercom-react-native@1.1.1