firebase - 使用 Ionic 4 和 cordova google 插件构建 iOS
问题描述
当我尝试将 ios 作为新平台添加到我正在工作的 android ionic 4 应用程序中时,我收到大量这些消息:
[!] 找到多个规范
GoogleDataTransport (3.2.0)
: - /Users/haraldwiesinger/.cocoapods/repos/cocoapods/Specs/0/6/a/GoogleDataTransport/3.2.0/GoogleDataTransport.podspec.json - /Users/haraldwiesinger/.cocoapods/repos /trunk/Specs/0/6/a/GoogleDataTransport/3.2.0/GoogleDataTransport.podspec.json[!] 找到多个规范
GoogleUtilities (6.4.0)
: - /Users/haraldwiesinger/.cocoapods/repos/cocoapods/Specs/0/8/4/GoogleUtilities/6.4.0/GoogleUtilities.podspec.json - /Users/haraldwiesinger/.cocoapods/repos /trunk/Specs/0/8/4/GoogleUtilities/6.4.0/GoogleUtilities.podspec.json
在这些科尔多瓦插件中从 github 的现有票证中阅读了很长时间之后。我发现这与谷歌服务的不兼容版本和插件正在使用的 pod 文件有关。
我正在使用cordova-plugin-firebasex
和cordova-plugin-googleplus
。
其他人的解决方案是在他们的 ios 文件夹中运行 pod update 和 pod install .. 但我无法创建导致这些错误的平台原因.. 所以我无法在那里运行命令。
我也尝试更新 plugin.xml 的版本:
<pod name="GoogleUtilities" spec="~> 6.13.0"/>
从两个插件到相同的值,但错误仍然存在
有人知道如何解决这个问题吗?
解决方案
找到解决方法:
文件:插件/cordova-plugin-googleplus/plugin.xml
<podspec>
<config>
<source url="https://cdn.cocoapods.org/"/>
</config>
<pods use-frameworks="true">
<pod name="GoogleSignIn" spec="~> 4.4.0"/>
<pod name="GoogleUtilities" spec="~> 6.4.0"/>
</pods>
</podspec>
推荐阅读
- unit-testing - 如何在 ResponseEntityExceptionHandler @ControllerAdvice 中模拟服务
- javascript - Overlay a semi-transparent box over any HTML element
- php - 如何创建一个仅用于字符串操作的类并在所有其他类中用于在其他类中重复的特定操作
- visual-studio-2017 - Visual Stduio 2017 中的未知对象
- c# - 引用服务时如何使用 dll 的 .config 文件?
- c# - C# 使用 System.Reflection 订阅 COM 对象的事件
- javascript - 将日期(UTC)转换为另一个时区的日期(支持 DST)
- ionic-framework - ionic - 在哪里编写调用的方法
在离子 - python - 如果列值为“foo”,则在同一行上附加具有新值的数据框?
- php - 使用 yii2 重新加载在 cookie 中分配的新值