[英]package resolution failed xcode
I am running macOS Monterey 12.4 on an M1 MBP with XCode 13.4 installed.我在安装了 XCode 13.4 的 M1 MBP 上运行 macOS Monterey 12.4。
I'm building a swiftUI project for ios and trying to connect a Firebase/FireStore DB to the project using Swift Package Manager and import: firebase-ios-sdk. I'm building a swiftUI project for ios and trying to connect a Firebase/FireStore DB to the project using Swift Package Manager and import: firebase-ios-sdk.
On doing so, I get a Package Resolution Failed message with a box and list of all the firebase-ios-sdk that could not be resolved: list这样做时,我收到一条 Package Resolution Failed 消息,其中包含一个框和所有无法解决的 firebase-ios-sdk 的列表:list
Package Resolution failed Package 解析失败
I tried deleting the derived data folder content, resetting package caches, resolving the package version, restart Xcode.我尝试删除派生数据文件夹内容,重置package缓存,解析package版本,重启Xcode。 Did not work.不工作。
Last night I uninstalled XCode and re-installing Xcode overnight.昨晚我卸载了 XCode 并一夜之间重新安装了 Xcode。 Did not work, still the same issue today.没用,今天还是一样的问题。
When I import Firebase to the.swiftui file, I get a code error message - No such module 'FirebaseCore'当我将 Firebase 导入到 .swiftui 文件时,我收到一条代码错误消息 - 没有这样的模块“FirebaseCore”
I will really appreciate your assistance, I am a Newby.我将非常感谢您的帮助,我是 Newby。
Thanks Adriaan谢谢阿德里安
UPDATE: (SOLUTION)更新:(解决方案)
Chris Parker @ https://codecrew.codewithchris.com solved the issue for me. Chris Parker @ https://codecrew.codewithchris.com为我解决了这个问题。
Here is what he wrote and it worked for me:这是他写的,对我有用:
"I just tried to install Firebase again and the problem still exists. I looked a bit closer to the options that had defaulted with regard to the Dependency rule and the option that had defaulted was “Branch”. I changed that to “Up to the next major version” and the package selections that I was expecting to see did in fact appear so that's what the problem was." “我只是尝试再次安装 Firebase,但问题仍然存在。我看起来更接近于依赖规则默认的选项,默认的选项是“分支”。我将其更改为“直到下一个主要版本”,而我期望看到的包选择确实出现了,所以这就是问题所在。”
I just want to say a really big thank you to Chris at codewithchris, he really came through for me.我只想对 codewithchris 的 Chris 表示非常感谢,他真的为我而来。
THANK YOU CHRIS PARKER谢谢克里斯·帕克
Xcode "File" -> "Packages" -> "Reset Package Caches" solved the issue for me. Xcode“文件”->“包”->“重置 Package 缓存”为我解决了这个问题。 Hopefully, it will be useful to others as well.希望它对其他人也有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.