无法使用cordova-plugin-firebasex将iOS平台添加到Cordova项目

v8wbuo2f  于 2022-11-15  发布在  iOS
关注(0)|答案(1)|浏览(213)

firebasex Cordova插件让我抓狂!我的项目几个月来一直运行良好,直到我将cordova-plugin-firebasex从11.0.3-cli更新为14.1.0。这是我在运行Cordova平台add ios后得到的错误:

Failed to install 'cordova-plugin-firebasex': Error: pod: Command failed with exit code 31
at ChildProcess.whenDone (/Users/mmhayes/Documents/MyQCWeb/MyQC_v6_7/node_modules/cordova-common/src/superspawn.js:136:25)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)

我的环境:

Cordova -v
11.0.0

Cordova platform ls
Installed platforms:
  ios 6.2.0
Available platforms: 
  android ^10.1.1
  browser ^6.0.0
  electron ^3.0.0
  osx ^6.0.0

Cordova plugin ls
cordova-plugin-firebase-analytics 6.1.0 "FirebaseAnalyticsPlugin"
cordova-plugin-firebase-dynamiclinks 6.1.3 "FirebaseDynamicLinksPlugin"
cordova-plugin-firebasex 14.1.0 "Google Firebase Plugin"

我相信这个问题与pod版本有关,但我不确定。网络上没有太多关于“退出代码31”错误的信息。我试过他们建议的解决方案,但没有成功。这包括运行

Cordova clean
Cordova plugin rm cordova-plugin-firebasex
Cordova plugin add cordova-plugin-firebasex
pod repo update
sudo gem install cocoa pods

我知道这是不言而喻的,但任何帮助都非常感谢!我可以提供更多关于我的环境的信息,如果这会有帮助的话。

编辑10月25日下午4:22

我的项目的播客文件:

source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
use_frameworks!
target 'My Quickcharge' do
    project 'My Quickcharge.xcodeproj'
    pod 'Firebase/Analytics', '~> 8.8.0'
    pod 'Firebase/DynamicLinks', '~> 8.8.0'
    pod 'Firebase/Core', '9.1.0'
    pod 'Firebase/Auth', '9.1.0'
    pod 'Firebase/Messaging', '9.1.0'
    pod 'Firebase/Performance', '9.1.0'
    pod 'Firebase/RemoteConfig', '9.1.0'
    pod 'Firebase/InAppMessaging', '9.1.0'
    pod 'FirebaseFirestore', :tag => '9.1.0', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git'
    pod 'Firebase/Crashlytics', '9.1.0'
    pod 'Firebase/Functions', '9.1.0'
    pod 'Firebase/Installations', '9.1.0'
    pod 'GoogleSignIn', '6.2.1'
    pod 'GoogleTagManager', '7.4.1'
end

此外,当我尝试运行pod install --repo-update时,我得到以下错误:

pod install --repo-update
Updating local specs repositories

CocoaPods 1.11.3 is available.
To update use: `gem install cocoapods`

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.11.3

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/DynamicLinks":
  In Podfile:
    Firebase/DynamicLinks (= 6.33.0)

None of your spec sources contain a spec satisfying the dependency: `Firebase/DynamicLinks (= 6.33.0)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.
lymgl2op

lymgl2op1#

它是字面上的插件的文档。

sudo gem install cocoapods-dependencies
cd platforms/ios/
pod dependencies

如果您收到类似以下的建置错误:没有等级库源包含满足依赖关系的等级库:Firebase/Analytics (~> 6.1.0), Firebase/Analytics (= 6.1.0, ~> 6.1.0) .
通过运行pod repo update,然后在/your_project/platforms/ios/中运行pod install,确保您的本地Cocoapods repo是最新的。
https://github.com/dpa99c/cordova-plugin-firebasex#cocoapods

相关问题