Flutter ios开发:需要通过xcode包管理器安装firebase-ios-sdk吗?

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

我按照 Firebase 设置中指定的方式通过 Xcode 包管理器安装了

firebase-ios-sdk
(请参阅 https://firebase.google.com/docs/ios/setup)。

但是当我运行

flutter build ios -v
时,构建失败并显示

Failed to build iOS app
[   +6 ms] Uncategorized (Xcode): Could not resolve package dependencies:
             downloaded archive of binary target 'openssl_grpc' from

'https://dl.google.com/firebase/ios/bin/grpc/1.62.2/rc0/openssl_grpc.zip' does
             not contain a binary artifact.
             downloaded archive of binary target 'absl' from

'https://dl.google.com/firebase/ios/bin/abseil/1.2024011601.1/rc0/absl.zip'
             does not contain a binary artifact.
             downloaded archive of binary target 'grpc' from
             'https://dl.google.com/firebase/ios/bin/grpc/1.62.2/rc0/grpc.zip'
does not
             contain a binary artifact.
             fatalError
           
           
[   +9 ms] "flutter ios" took 243,811ms.
[  +30 ms] Encountered error while building for device.
[   +1 ms] 
           #0      throwToolExit
           ...
           ...
[ +113 ms] ensureAnalyticsSent: 109ms
[        ] Running 1 shutdown hook
[        ] Shutdown hooks complete
[   +8 ms] exiting with code 1
liamhp@Liams-MacBook-Air my-app% 

但是,如果我不安装

firebase-ios-sdk
,我会收到完全不同的错误。所以我不确定我是否真的应该通过 xcode 安装 sdk 还是仅仅依赖 pods/flutter pub。

ios flutter xcode firebase flutter-packages
1个回答
0
投票

给未来的搜索者的 PSA - 你不需要它,添加它可能会导致 swift 包管理器和 pod 之间发生冲突

© www.soinside.com 2019 - 2024. All rights reserved.