关于Firebase:使用Ionic 4和Cordova Google插件构建iOS

Building iOS with Ionic 4 and cordova google plugins

当我尝试将ios作为新平台添加到正在运行的android ionic 4应用程序时,我收到大量以下消息:

[!] Found multiple specifications for 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

[!] Found multiple specifications for 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"/>
从两个插件设置为相同的值,但错误仍然存??在

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


找到了解决方法:

文件:plugins / cordova-plugin-googleplus / plugin.xml

1
2
3
4
5
6
7
8
9
<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>