Open marcuswestin opened 4 years ago
I finally got ObjectiveGit working on macOS 10.15.1 Catalina and Xcode 11! Here's a quick recap of the problems I ran into and the eventual solution - hopefully useful for anyone running into similar issues dow: the road.
First I tried installing the latest release (0.14.2) with carthage, using Cartfile entry:
github "libgit2/objective-git"
But then macOS fails with error:
dyld:
Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
Referenced from: ...
Reason: image not found
After many different attempts, I finally managed to get everything working by forking the repository, creating a branch off of the latest release, and using that as my Cartfile dependency:
github.com "marcuswestin/objective-git" "0.14.2-fork-for-catalina-xcode11"
I had to jump through a few additional hoops to get everything finally working, not necessarily related to this library, but worth noting:
import ObjectiveGit
in any swift file you want to use it in, or#import <ObjectiveGit/ObjectiveGit.h>
in your ...-Bridging-Header.h
file for access from any swift file in your project.Curl: could not resolve <domain>
error
This makes it work! Why? I'm not certain, but my guess is that because the latest libgit2/objective-git
release has binary builds, Carthage downloads and uses those, but they don't work with Catalina. However, when using the branch build, Carthage has to build from source - and then it works!
I faced the exact same problem (Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
) and solved it by building Objective Git like so:
carthage update --platform macOS --no-use-binaries
This was just using @marcuswestin's intuition that the solution was to force Carthage to build from source, and finding the --no-use-binaries
flag to do that explicitly.
Hi, I would love help getting ObjectiveGit running on macOS.
I'm on Catalina 10.15.1 and Xcode Version 11.1.
I'm building using Carthage, following all the steps. iOS seems to work fine. MacOS does not:
Looking in
/usr/local/opt/openssl/lib/
I seelibcrypto.1.1.dylib
, but notlibcrypto.1.0.0.dylib
.(If relevant at all, I was able to get https://www.github.com/SwiftGit2/SwiftGit2 to run on macOS)
Any pointers would be super, super appreciated!
Thanks