Hello developers,
I've been building out my platform, mostly working on the Android side of a flutter app. Today I decided to make sure the iOS version wasn't getting too far behind, but when I attempted to build the app I began running into an issue I've never seen before, and after spending about 8 hours trying to figure this out, I feel like I'm more lost than when I began.
The error when trying to build:
Uncategorized (Xcode): Could not resolve package dependencies: downloaded archive of binary target 'grpc' from 'https://dl.google.com/firebase/ios/bin/grpc/1.65.1/rc1/grpc.zip' does not contain a binary artifact. fatalError
This is a flutter app which uses firebase as a backend. I've been building with flutter/ios for about 6 years now and have never encountered this, and after searching google it appears that no one else aside from 2 people have either.
I found that there's a github repo which contains this dependency as well, so I was going to try to modify the URL from the google.com url to the github url, but I'm not surewhere I would look to change this reference.. or if this is even possible.
Does anyone have any experience with this error?
Thank you for the post. It appears to be an issue with Firebase. Please ensure that you have the latest version of the Firebase framework installed. Additionally, I recommend searching for this error on their support channel.
I have compiled a list of resources that may be helpful in resolving this issue, but is pretty generic, my apologies if you already tried most of those:
- Clear the Package Cache:
- Open Terminal and navigate to the root directory of your Xcode project to clear the package cache.
- Remove the Downloaded Package:
- Go to the Xcode project file in Finder.
- Right-click on the project file and select "Show Package Contents."
- Navigate to the "Packages" directory inside the project.
- Manually Download and Install the Binary:
- Go to the official release page for that package.
- Unzip the package to a temporary location.
- Add the Binary to the Package:
- In Xcode, right-click on your project file and select "Add Files to "YourProjectName".
- Choose the "Binary" option and navigate to the temporary location where you unzipped the package.
- Select the framework file and click "Add."
- Update Package Dependencies:
- With the framework added to your project, open the project in Xcode.
- In Xcode, go to your project target -> General -> Frameworks, Libraries, and Embedded Content.
- Click the "+" button, select the "framework" (or xcframework), and click "Add."
- Rebuild the Project:
- Save your changes and try to build the project again.
Additional Considerations:
- Check Xcode Version: Make sure you are using the latest version of Xcode that supports the package you downloaded.
- Verify the Package URL: Double-check the package URL you used to download the package. The error message suggests that the downloaded archive does not contain the binary artifact, so the URL might be incorrect.
- Contact the Package Maintainer: If the issue persists, reach out to the package maintainers or the Firebase support team if you are using Firebase's version to inquire about any known issues with the binary artifact.
By adhering to the aforementioned steps and taking into account the supplementary considerations, I trust you will be able to successfully resolve the “Uncategorized (Xcode): Could not resolve package dependencies” error and complete the compilation of your Xcode project.
Please inform me of the outcome of your efforts.
Albert Pascual Worldwide Developer Relations.