如何修复POD的不兼容版本“ React Areact Native Intercom”
我在设置对讲机使者的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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在尝试
手册
安装react-inter-intercom
,涉及Intercom Integration 文档不用担心使用cd ios&amp&的自动链接使用自动链接POD安装
或npx Pod-install
,此库也将自动链接。因此,请删除此行
pod'react-native-intercom',:path => '../ node_modules/react-native-intercom'
来自您的podfile
,然后重试。它也会工作。
确认:
希望这对您有帮助。
You are trying to
manual
install thereact-native-intercom
, regarding the intercom integration documentation no worry to use Automatic linking withcd ios & pod install
ornpx 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 yourPodfile
, and try again.It will work as well.
Confirmed with:
Hope this will help you.