Closed jurvis closed 2 years ago
@Sjors putting this PR up so you can track my progress with this.
Right now, I've gotten build-libwally.sh
to spit out an xcframework for device-only, simulator-only, or both (with https://github.com/ElementsProject/libwally-core/pull/321/commits/59652b58b26adc7cbc290010833a2bca3b848b42 checked out as libwally-core
)
Over the coming days I'll test it with Carthage/Cocoapods. Once that's done, you're OK with these changes, and https://github.com/ElementsProject/libwally-core/pull/321 is merged, we can put out a release and everything should work again!
Thanks! This all sounds great, I'll give it a review soon(tm); I'm just back from the Miami conference, so a bit behind on ... everything.
I like the idea of using the Swift Package Manager, though I suggest a separate PR for that. I might even drop Cocoapods and Carthage once that works, unless there's a good reason other projects can't use the Swift Package Manager.
I just bumped the libwally-core version in #62 (unmerged), so you might want to rebase on that so you can drop 4050ff7cca76dbdc0f356d7b3385f708ff19c732 and 45889941d992c62a69d496188541f8f74161bb85.
If it makes things easier (see https://github.com/Sjors/libwally-swift/pull/62#issuecomment-1098175785) feel free to create a separate PR that cherry-picks some commits from here.
@Sjors sorry I need some time to catch up on some school deadlines over the next couple of days. hoping to get this done by this weekend 😄
Take your time!
By the way, it should be possible to just force push, rather than open a new PR.
@Sjors oh, yeah. Not sure why I didn’t think of that. Must’ve been late 😅
This PR is still a work in progress! fixes https://github.com/Sjors/libwally-swift/issues/59
Purpose
This PR primarily does a few things:
libtool@2.4.7
change which will require a PR merge inlibwally-core
(https://github.com/ElementsProject/libwally-core/pull/321)2.Implementation
To achieve 1, I noticed that the latest
libwally-core
change no longer includeslibsecp256k1
symbols inside thelibwally-core.a
library. To keep this simple, I importedlibsecp256k1.a
fromCLibWally/libwally-core/src/secp256k1/.libs
to the Xcode projectTo achieve 2, we will have to build an
xcodebuild -xcframework
instead of using the previouslipo
build command. This is because M1 macs usearm64
as an architecture for iOS simulator, which will conflict in a fat binary since an iOS simulator'sarm64
arch is undifferentiated from an iOS device'sarm64
arch.Testing Notes
Follow-up