How to use a fork of a package in Xcode project?

There is a package that I want to use in my iOS app project. Although it lacked certain functionality, the GitHub community is great and it was added by some kind soul.

However, as it was not yet merged with original repository, this functionality lives only in the fork. And that's when there came the trouble.

Although I'm supplying the Package Manager with the link to the fork, it does a great job in correcting me and points me to the original repo. I've seen that one can lock onto a specific commit hash in this article: https://www.swiftbysundell.com/articles/managing-dependencies-using-the-swift-package-manager/#adding-remote-dependencies, but it was only shown for Packages, not Projects in Xcode.

Is there a way out of it? Is there a file I could edit to bring me the functionality I crave before I grow old?

Replies

I had the same issue, although there didn't seem to be any way to set the fork in Xcode as like you say it seems to stubornly set it to the original repo

I did have success editing the project file in a text editor: {project}.xcodeproj/project.pbxproj and update the repositoryURL there

That prompted Xcode to fetch the dependencies again, this time of the fork