[英]Error after adding FirebaseFireStoreSwift-Beta with Swift Package Manager
I setup a new project using Firebase SDK and only get this error when I add FirebaseFirestoreSwift-Beta.我使用 Firebase SDK 设置了一个新项目,只有在我添加 FirebaseFirestoreSwift-Beta 时才会出现此错误。 I have it in other projects that was built before Mar-8th and have no issues running them but it won't work on any new projects.我在 3 月 8 日之前构建的其他项目中有它,运行它们没有问题,但它不适用于任何新项目。 I have went back and watched videos to make sure I wasn't missing a step when installing.我已经回去观看视频以确保我在安装时没有遗漏任何步骤。 I am using Xcode 12.4我正在使用 Xcode 12.4
Is this an issue with the Beta or is there something I am missing on my end?这是 Beta 版的问题还是我遗漏了什么?
Many apologies, the issue was introduced by me.非常抱歉,这个问题是我介绍的。
It appears that symbol resolution has changed slightly in Swift between Xcode 12.4 and Xcode 13.似乎符号分辨率在 Swift 中在 Xcode 12.4 和 Xcode 13 之间略有变化。
I have made a PR that fixes the compilation issue on Xcode 12.4 here: https://github.com/firebase/firebase-ios-sdk/pull/9438我做了一个 PR,修复了 Xcode 12.4 上的编译问题: https://github.com/firebase/firebase-ios-sdk/pull/9438
Until then, if possible, you can update to the latest version of Xcode. If that is not possible, then if you use a package manager where you can make local edits, you can rename the variable data
to something else (like d
) to make it compile.在那之前,如果可能,您可以更新到最新版本的 Xcode。如果这不可能,那么如果您使用 package 管理器,您可以在其中进行本地编辑,您可以将变量data
重命名为其他名称(如d
)以让它编译。
If you can't do that, then a more substantial workaround would be to fork the repository, check out the release tag, create a new branch and fix the error, then pointing your package manager to you own branch including the fix.如果你不能这样做,那么一个更实质性的解决方法是分叉存储库,检查发布标签,创建一个新分支并修复错误,然后将你的 package 经理指向你自己的分支,包括修复。
Another solution is of course to stay on 8.12 of Firebase until the PR above is merged and released.另一种方案当然是留在Firebase的8.12,直到上面的PR合并发布。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.