使用Ionic 4和Cordova Google插件构建iOS应用程序

3

当我尝试将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

在阅读了现有的 Cordova 插件的 GitHub 中的长时间票证之后,我发现这与 Google 服务的不兼容版本以及插件使用的 pod 文件有关。

我正在使用cordova-plugin-firebasexcordova-plugin-googleplus

其他人的解决方法是在他们的 iOS 文件夹中运行 pod update 和 pod install,但由于这些错误,我无法创建平台,因此无法在那里运行这些命令。

我还尝试将 plugin.xml 的版本更新为以下内容: <pod name="GoogleUtilities" spec="~> 6.13.0"/> 从两个插件的版本都更新到相同的值,但错误仍然存在。

有人有任何想法如何解决这个问题吗?

1个回答

1
发现解决方法:
文件:plugins/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>

谢谢你的回答,我已经尝试了很多不同版本的组合,但还是没有成功...我也将配置源更改为新的cocoapods.org,但仍然没有任何进展 :( - Harald Wiesinger

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接