小编ami*_*t17的帖子

命令 PhaseScriptExecution 失败并出现非零退出代码 - 使用 CocoaPods

我在构建项目时收到以下错误:Command PhaseScriptExecution failed with a nonzero exit code在此输入图像描述

这就是我的[CP] Embed Pods Frameworks在此输入图像描述

我也做了一个pod deintegratepod install这些框架继续显示为红色:

在此输入图像描述

我已经开机Xcode Version 12.4,我的 Mac 上有Apple M1芯片。关于我可以做些什么来解决这个错误有什么想法吗?

xcode cocoa ios cocoapods swift

8
推荐指数
1
解决办法
3万
查看次数

不支持解码(“DocumentID 值只能使用 Firestore.Decoder 进行解码”)

我有以下内容struct

struct Recipe: Codable {
    @DocumentID var id: String?
    var vegetarian: Bool?
}
Run Code Online (Sandbox Code Playgroud)

这就是我解析 Firestore 数据的方式:

do {
    let decoder = JSONDecoder()
    let recipeToDisplay = try decoder.decode(Recipe.self, from: data!)
                    
    let uuid = UUID().uuidString
                    
    FirestoreService.createRecipe(
        documentId: uuid,
        vegetarian: recipeToDisplay.vegetarian ?? false
    ) { recipeURL in
        print("success")
    }
} catch {
    print("Error parsing response data: \(error)")
}
Run Code Online (Sandbox Code Playgroud)

catch声明被调用,我收到以下错误消息:decodingIsNotSupported("DocumentID values can only be decoded with Firestore.Decoder")

我研究过的所有文档都指出我要使用它来JSONDecoder()解析数据,但我在Firestore.Decoder. 我应该有不同的方式来解析数据吗?

json ios firebase swift google-cloud-firestore

5
推荐指数
1
解决办法
840
查看次数

标签 统计

ios ×2

swift ×2

cocoa ×1

cocoapods ×1

firebase ×1

google-cloud-firestore ×1

json ×1

xcode ×1