如何修复POD的不兼容版本“ React Areact Native Intercom”

发布于 2025-01-24 08:10:03 字数 1477 浏览 2 评论 0原文

我在设置对讲机使者的React Native项目上遇到了一些问题。我已经设置了对Intercom文档的指示。但是,当我使用POD安装时,我会给我2个错误。

[!] Cocoapods找不到POD“ Intercom”的兼容版本:
在Podfile中: 对讲机反应(来自../ node_modules/@Intercom/Intercom/Intercom-react-native)已解决为 3.0.0,取决于 Intercom(〜> 12.0.0)

  react-native-intercom(来自`../ node_modules/react-native-intercom`)解析为21.1.1
 

取决于 对讲(〜> 10)

这是Podfile

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '13.0'

target 'Mobapp' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  pod 'react-native-intercom', :path => '../node_modules/react-native-intercom'

  target 'MobappTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

  # post_install do |installer|
  #   react_native_post_install(installer)
  #   __apply_Xcode_12_5_M1_post_install_workaround(installer)
  # end
end

Intercom内部的代码:

"react-native-intercom": "^21.1.1",
"@intercom/intercom-react-native": "^3.0.0",

I experience some problem on my react native project setting up the Intercom Messenger. I already set up those instructions given on the documentation of intercom. However I got 2 error given to me when I used the Pod Install.

[!] CocoaPods could not find compatible versions for pod "Intercom":
In Podfile:
intercom-react-native (from ../node_modules/@intercom/intercom-react-native) was resolved to
3.0.0, which depends on
Intercom (~> 12.0.0)

react-native-intercom (from `../node_modules/react-native-intercom`) was resolved to 21.1.1, which

depends on
Intercom (~> 10)

Here is the code inside PodFile

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '13.0'

target 'Mobapp' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  pod 'react-native-intercom', :path => '../node_modules/react-native-intercom'

  target 'MobappTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

  # post_install do |installer|
  #   react_native_post_install(installer)
  #   __apply_Xcode_12_5_M1_post_install_workaround(installer)
  # end
end

Intercom Version:

"react-native-intercom": "^21.1.1",
"@intercom/intercom-react-native": "^3.0.0",

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

美人迟暮 2025-01-31 08:10:03

您正在尝试手册安装react-inter-intercom,涉及Intercom Integration 文档不用担心使用cd ios&amp&的自动链接使用自动链接POD安装npx Pod-install,此库也将自动链接。

因此,请删除此行pod'react-native-intercom',:path => '../ node_modules/react-native-intercom'来自您的podfile,然后重试。
它也会工作。

确认:

Intercom RN: "@intercom/intercom-react-native": "^3.0.5"
ReactNative: `0.66.2`
iOS: `15.5`

希望这对您有帮助。

You are trying to manual install the react-native-intercom, regarding the intercom integration documentation no worry to use Automatic linking with cd ios & pod install or npx pod-install, this library will be linked automatically as well.

so please remove this line pod 'react-native-intercom', :path => '../node_modules/react-native-intercom' from your Podfile, and try again.
It will work as well.

Confirmed with:

Intercom RN: "@intercom/intercom-react-native": "^3.0.5"
ReactNative: `0.66.2`
iOS: `15.5`

Hope this will help you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文