-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Swift builds #294
Fix Swift builds #294
Conversation
.. for `SystemConfiguration`
tl;dr I got this working in Xcode 15.4 w a small additional fix. But since what we are fixing is a bit of a black box here's my running notes on the process of how I tested and the fix I applied in case anyone else wants to run thru what I did or did something different or has any additional insights EnvironmentI have the new Xcode 15.4, as well as still have the old (pre-everything-breaks) Xcode 15.2. I’m using Xcode 15.2 as sanity tests for where everything should be working regardless so I can compare vs fixes for Xcode 15.4. VersionsI’m using a version of Monday https://github.com/reez/Monday/pull/88/commits that is keeping up with all of the new changes in ldk-node https://github.com/lightningdevkit/ldk-node/commits/main/ … the last change on ldk-node is b7c4862 which matches the local build of the swift bindings I’m using for that branch of Monday reez/Monday@81581bd Current PRhttps://github.com/tnull/ldk-node/tree/2024-05-fix-swift-builds only adds two commits on top of b7c4862 When I pull down #294 to use in Monday as a remote package for reez/Monday#88 I get a bunch of errors (as if all of the new commits in ldk-node from the past month+ or so haven’t been added) ... Example: Local BuildSo lets locally build https://github.com/tnull/ldk-node/tree/2024-05-fix-swift-builds I’ll fork tnull repo and build swift bindings locally. I got these bindings to build and run successfully on Xcode 15.2! And I got these bindings to build and run successfully on Xcode 15.4! Now trying to archive Monday and upload to App Store Connect (last TestFlight build was 91), I got a failure for This PR vs BDK PR (It looked like part of the Info plists were different than mine)bindings/swift/LDKNodeFFI.xcframework/Info.plistbindings/swift/LDKNodeFFI.xcframework/ios-arm64/LDKNodeFFI.framework/Info.plistbdk-swift/bdkFFI.xcframework/ios-arm64_x86_64-simulator/bdkFFI.framework/Info.plistLooks good bindings/swift/LDKNodeFFI.xcframework/macos-arm64_x86_64/LDKNodeFFI.framework/Info.plistLooks good scripts/uniffi_bindgen_generate_swift.shWe dont have this change in bdk-ffi, I’m just going to assume these are strictly for #231 OtherAlso just make sure versions match Package.swift of specific repo (that's what I'm trying to match in the Info.plist files) Yes both ldk-node https://github.com/tnull/ldk-node/blob/2024-05-fix-swift-builds/bindings/swift/Package.swift and bdk-ffi https://github.com/bitcoindevkit/bdk-ffi/blob/release/0.31/bdk-swift/Package.swift seem to support the same:
My additional fixSo lets update tnull fork branch with my additional fixes applied on top Build succeeds still! I was able to archive and upload to App Store Connect with Xcode 15.4! I also tested using that new TestFlight build 92 on a physical device myself as well, and that worked! Everything works similar to bdk now where at least from my testing I'm able to do all of these things in Xcode 15.4:
Follow up:All of the changes that make this work locally just need to propagate to |
bindings/swift/LDKNodeFFI.xcframework/ios-arm64/LDKNodeFFI.framework/Info.plist
Outdated
Show resolved
Hide resolved
974267d
to
6dec002
Compare
Right, this is expected. We only update the checked-in files and the So, if there's nothing else from your side, I'll merge this PR tomorrow. Then I'll backport it on top of 0.2.1 will release a fixed v0.2.2. |
Ok sounds good, then yeah all my testing is done now until it gets released, and then I'll just make sure to test again once the new release is cut just for good measure. 🚀 |
Everything works as expected from me pulling in v0.2.2 remotely, build+run+archive+upload 🚀 reez/Monday#89 |
Fixes #231
Fixes #279
Unfortunately Apple broke our Swift packages with the recent Xcode 15.3 release. Here, we add the (now) required information to (hopefully) make our builds works again.
Moreover, we add a oneliner, automatically patching
LDKNode.swift
with the fix for #231 in the build script.