Swift Package Manager failed

I am running macOS Monterey 12.4 on an M1 MBP with XCode 13.4 installed.

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

I tried deleting the derived data folder content, resetting package caches, resolving the package version, restart Xcode. Did not work.

Last night I uninstalled XCode and re-installing Xcode overnight. 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’

I will really appreciate your feedback?

Kind Regards
Adriaan

Yes I got the same result on a brand new project. There appears to be a problem with the SDK so maybe come back later in an hour or 2 and try again.

Hi Chris

A sincere big thank you from me. I was going crazy here trying to figure it out. What makes it worse is that I know just enough to be dangerous in dev.

What gave me hope is that I could upload Alamofire.

Anyway, big thanks for your effort.

Adriaan

@A3aan

Hi Adriaan,

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.

All you do now is scroll down the list of dependencies that you want to install and check them and then tap “Add Package” and you should be good to go. The ones I chose in the screenshot below were just arbitrary for the sake of the example.

Hi Chris Parker

I just want to say from the bottom of my heart - Thank You, you saved me. Just thank you, you really helped me out here, I truly appreciate it. Here are the links to StackOverflow and Github where I credited you and codewithchris for coming up with a solution.

[https://stackoverflow.com/questions/72315977/package-resolution-failed-xcode]

Kind Regards
Adriaan Visagie
Stellenbosch South Africa

https://github.com/firebase/firebase-ios-sdk/issues/9821

@A3aan

Hi Adriaan,

Glad you’ve got it sorted out and working.

:+1: