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

问题描述 投票:0回答:1

[当我尝试将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更新和pod安装。但是我无法创建导致这些错误的平台。因此我无法在其中运行命令。

我还试图更新plugin.xml的版本:<pod name="GoogleUtilities" spec="~> 6.13.0"/>两个插件设置为相同的值,但错误仍然存​​在

有人知道如何解决此问题吗?

firebase cordova cocoapods cordova-plugins ionic4
1个回答
0
投票

找到解决方法:

文件: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>
© www.soinside.com 2019 - 2024. All rights reserved.