ios - 由于 Firebase GoogleService-Info.plist,Codemagic iOS 构建失败

标签 ios firebase flutter codemagic

我正在使用 iOS 的 codemagic 构建我的 flutter 项目。 android 构建工作正常。 iOS 构建错误:

    Xcode build done.                                           1520.2s
    
    Failed to build iOS app
    Error output from Xcode build:
    ↳
        ** BUILD FAILED **
    
    
    Xcode's output:
    
    [...]

    error: Build input file cannot be found: '/Users/Downloads/GoogleService-Info.plist' (in target 'Runner' from project 'Runner')
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Encountered error while building for device.



Build failed :|
Failed to build for iOS

但是我的 ios/Runner 包含 GoogleService-Info.plist 文件。

我也尝试过创建环境变量来存储这个文件,但没有成功。

我被困在这一点上,所以非常感谢任何帮助!

最佳答案

解决了问题! 正如@Paul Beusterien 所提到的,构建系统期望文件位于/Users/Downloads/GoogleServices-Info.plist。

如何改变?

两种可能的解决方案:

  1. 如果你有 Xcode: 只需单击文件并使用文件检查器将路径的位置更改为“相对于项目”。

2.不使用Xcode: 进入您的 project.pbxproj 文件并查找 name="GoogleServices-Info.plist"path="..."并将该路径更改为“GoogleServices-Info.plist”,如果该文件位于您的 ios/Runner/中文件夹。

关于ios - 由于 Firebase GoogleService-Info.plist,Codemagic iOS 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63639855/

相关文章:

ios - 想要通过从 firebase 下载数据来显示,在 tableView 中添加一个 collectionView 。 ios 应用程序 swift

json - 如何在 flutter 中发送多部分请求中的对象列表?

Flutter 应用介绍与用户交互

ios - UIImageView 的活力效果

ios - JWPlayer 截断 iOS 字幕中的字幕

java - 如何添加新 child 而不覆盖其他 child

php - Swift:未收到 FCM 通知

ios - Uitableview Cell Animation like Secret App

ios - 如何对 NSDictionary 数组进行排序

Flutter - 在 PopupMenuButton onTap 中导航不起作用