From 9eacb395ed2b0e8eb547bd63770e5c3149522058 Mon Sep 17 00:00:00 2001 From: Maxnflaxl Date: Sat, 9 May 2026 02:59:46 +0200 Subject: [PATCH 1/7] enable asset swap support for ios builds --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d8de51496c..2ad1f2db81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -351,7 +351,6 @@ if(IOS) set(BEAM_WALLET_CLIENT_LIBRARY TRUE) set(BEAM_TESTS_ENABLED FALSE) set(BEAM_ATOMIC_SWAP_SUPPORT OFF) - set(BEAM_ASSET_SWAP_SUPPORT OFF) set(BEAM_LASER_SUPPORT OFF) add_compile_definitions(BOOST_ERROR_CODE_HEADER_ONLY) CreateBoostComponentTargets("${BEAM_BOOST_COMPONENTS}" "$ENV{BOOST_ROOT_IOS}" "lib/libboost_" ".a") From 2d6babdebdfe557044685e545232ab845f165a2c Mon Sep 17 00:00:00 2001 From: Maxnflaxl Date: Sat, 9 May 2026 03:22:27 +0200 Subject: [PATCH 2/7] wallet_core: propagate BEAM_ASSET_SWAP_SUPPORT to ios builds Without this, dex_board.cpp fails to compile because the BEAM_ASSET_SWAP_SUPPORT-guarded saveDexOffer/dropDexOffer declarations on IWalletDB are hidden in the cpp's translation unit even when the option is ON, since the macro never reaches wallet_core (and therefore its transitive consumers) on iOS. --- wallet/core/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallet/core/CMakeLists.txt b/wallet/core/CMakeLists.txt index 3f735c3591..2fdc638115 100644 --- a/wallet/core/CMakeLists.txt +++ b/wallet/core/CMakeLists.txt @@ -48,7 +48,7 @@ target_link_libraries(wallet_core target_compile_features(wallet_core PUBLIC ${BEAM_INTERFACE_STANDARD}) -if (NOT ANDROID AND NOT IOS) +if (NOT ANDROID) if(BEAM_HW_WALLET) target_compile_definitions(wallet_core PUBLIC BEAM_HW_WALLET) From 4aca35bbfcd7e48ccda50feab78dc1b1369aa4a7 Mon Sep 17 00:00:00 2001 From: Maxnflaxl Date: Tue, 12 May 2026 16:23:21 +0200 Subject: [PATCH 3/7] ci(ios): enable BEAM_IPFS_SUPPORT, bump asio-ipfs for iOS toolchain Turn on BEAM_IPFS_SUPPORT for the iOS device and simulator workflow slices so libwallet_api.a / libwallet_client.a are built with ipfs_get / ipfs_add wired up (matching the desktop and Android builds instead of returning ApiError::NotSupported). Bump 3rdparty/asio-ipfs to the feat/ios-support tip (BeamMW/asio-ipfs#feat/ios-support), which adds CMAKE_SYSTEM_NAME=iOS cross-compilation paths for libipfs-bindings.a + libasio-ipfs.a. Without that submodule update the workflow flip would FATAL_ERROR at configure time on "Unsupported host platform iOS". --- .github/workflows/build.yml | 4 ++-- 3rdparty/asio-ipfs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e5f6cae567..24778f099f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -328,10 +328,10 @@ jobs: - name: Configure CMake && Build run: | export BOOST_ROOT_IOS="${{runner.workspace}}/dependencies/boost-ios" - cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=${{runner.workspace}}/dependencies/toolchain-ios/ios.toolchain.cmake -DPLATFORM=OS64 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DDEPLOYMENT_TARGET=11.0 -DENABLE_BITCODE=NO -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR -DOPENSSL_CRYPTO_LIBRARY=$OPENSSL_CRYPTO_LIBRARY -DOPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR -DOPENSSL_SSL_LIBRARY=$OPENSSL_SSL_LIBRARY -DOPENSSL_LIBRARIES=$OPENSSL_LIBRARIES -DIOS=YES -Wno-error=deprecated-declarations -Wno-error=deprecated -DCMAKE_TRY_COMPILE_PLATFORM_VARIABLES=CMAKE_WARN_DEPRECATED -DBEAM_IPFS_SUPPORT=Off -B./build + cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=${{runner.workspace}}/dependencies/toolchain-ios/ios.toolchain.cmake -DPLATFORM=OS64 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DDEPLOYMENT_TARGET=11.0 -DENABLE_BITCODE=NO -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR -DOPENSSL_CRYPTO_LIBRARY=$OPENSSL_CRYPTO_LIBRARY -DOPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR -DOPENSSL_SSL_LIBRARY=$OPENSSL_SSL_LIBRARY -DOPENSSL_LIBRARIES=$OPENSSL_LIBRARIES -DIOS=YES -Wno-error=deprecated-declarations -Wno-error=deprecated -DCMAKE_TRY_COMPILE_PLATFORM_VARIABLES=CMAKE_WARN_DEPRECATED -DBEAM_IPFS_SUPPORT=On -B./build make -C ./build -j$(sysctl -n hw.ncpu) export BOOST_ROOT_IOS="${{runner.workspace}}/dependencies/boost-ios-simulator" - cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=${{runner.workspace}}/dependencies/toolchain-ios/ios.toolchain.cmake -DPLATFORM=SIMULATOR64 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DDEPLOYMENT_TARGET=11.0 -DENABLE_BITCODE=NO -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR -DOPENSSL_CRYPTO_LIBRARY=$OPENSSL_CRYPTO_LIBRARY -DOPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR -DOPENSSL_SSL_LIBRARY=$OPENSSL_SSL_LIBRARY -DOPENSSL_LIBRARIES=$OPENSSL_LIBRARIES -DIOS=YES -Wno-error=deprecated-declarations -Wno-error=deprecated -DCMAKE_TRY_COMPILE_PLATFORM_VARIABLES=CMAKE_WARN_DEPRECATED -DBEAM_IPFS_SUPPORT=Off -B./build-simulator + cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=${{runner.workspace}}/dependencies/toolchain-ios/ios.toolchain.cmake -DPLATFORM=SIMULATOR64 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DDEPLOYMENT_TARGET=11.0 -DENABLE_BITCODE=NO -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR -DOPENSSL_CRYPTO_LIBRARY=$OPENSSL_CRYPTO_LIBRARY -DOPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR -DOPENSSL_SSL_LIBRARY=$OPENSSL_SSL_LIBRARY -DOPENSSL_LIBRARIES=$OPENSSL_LIBRARIES -DIOS=YES -Wno-error=deprecated-declarations -Wno-error=deprecated -DCMAKE_TRY_COMPILE_PLATFORM_VARIABLES=CMAKE_WARN_DEPRECATED -DBEAM_IPFS_SUPPORT=On -B./build-simulator make -C ./build-simulator -j$(sysctl -n hw.ncpu) - name: Save version info diff --git a/3rdparty/asio-ipfs b/3rdparty/asio-ipfs index ad9c6d639c..c7f2db2276 160000 --- a/3rdparty/asio-ipfs +++ b/3rdparty/asio-ipfs @@ -1 +1 @@ -Subproject commit ad9c6d639cf961bbf78eb850e773ff429c50688e +Subproject commit c7f2db22762292fa3027cd7c52dc5b5c798fc044 From 7640f3aea8362ec7f77bb9d5b9059cd4ed3ce1cc Mon Sep 17 00:00:00 2001 From: Maxnflaxl Date: Tue, 12 May 2026 17:05:33 +0200 Subject: [PATCH 4/7] bump asio-ipfs to beded1b (CGO_CFLAGS fix for iOS std-lib cgo) Pulls in BeamMW/asio-ipfs@beded1b which moves the iOS cross-compile flags from CC into CGO_CFLAGS / CGO_LDFLAGS so they reach Go's std-library cgo compiles (net, os/user, plugin). Previous run on this PR errored at those packages with `` / `` / `` file not found. --- 3rdparty/asio-ipfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/asio-ipfs b/3rdparty/asio-ipfs index c7f2db2276..beded1b291 160000 --- a/3rdparty/asio-ipfs +++ b/3rdparty/asio-ipfs @@ -1 +1 @@ -Subproject commit c7f2db22762292fa3027cd7c52dc5b5c798fc044 +Subproject commit beded1b29158a454e810de6d86138019b8518bf7 From 0ba2724032dffe9f1018a40a48d5b3d1a97c0506 Mon Sep 17 00:00:00 2001 From: Maxnflaxl Date: Tue, 12 May 2026 17:20:13 +0200 Subject: [PATCH 5/7] ci(ios): exclude Go-internal package archives from artifact collection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit asio-ipfs's cgo build leaves intermediate package archives scattered through 3rdparty/asio-ipfs/go-workspace/pkg/... (one per Go package, e.g. bidirule.a, golang_x_text_...). These aren't Mach-O — they're Go's own ar-archive format used for package caching — so the lipo step that fuses device + simulator slices choked on the first one it hit with `archive with no architecture specification`. Limit the find to non-go-workspace paths; the real iOS static libs (libwallet_api.a, libwallet_client.a, libipfs-bindings.a, etc.) live elsewhere under ./build and ./build-simulator. --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 24778f099f..bf1bda4e07 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -347,12 +347,14 @@ jobs: echo BEAM_VERSION = $BEAM_VERSION mkdir -p ${{runner.workspace}}/results/beam-ios/include mkdir -p ${{runner.workspace}}/results/beam-ios/lib - find ./build -name \*.a -type f -exec cp {} ${{runner.workspace}}/results/beam-ios/lib/ \; + # Skip Go-internal package archives left under asio-ipfs's go-workspace — + # they aren't Mach-O and would break the lipo step below. + find ./build -name \*.a -type f -not -path '*/go-workspace/*' -exec cp {} ${{runner.workspace}}/results/beam-ios/lib/ \; rsync -am --include='*.h' --include='*.hpp' --include='*/' --exclude='*' . ${{runner.workspace}}/results/beam-ios/include/ cp ./build/core/version.h ${{runner.workspace}}/results/beam-ios/include/core/ mkdir -p ${{runner.workspace}}/results/beam-ios-simulator/include mkdir -p ${{runner.workspace}}/results/beam-ios-simulator/lib - find ./build-simulator -name \*.a -type f -exec cp {} ${{runner.workspace}}/results/beam-ios-simulator/lib/ \; + find ./build-simulator -name \*.a -type f -not -path '*/go-workspace/*' -exec cp {} ${{runner.workspace}}/results/beam-ios-simulator/lib/ \; rsync -am --include='*.h' --include='*.hpp' --include='*/' --exclude='*' . ${{runner.workspace}}/results/beam-ios-simulator/include/ cp ./build/core/version.h ${{runner.workspace}}/results/beam-ios-simulator/include/core/ mkdir -p ${{runner.workspace}}/results/beam-ios-combined/include From 49db499d43132d6b24f45cfad27e2ba0ca4abc46 Mon Sep 17 00:00:00 2001 From: Maxnflaxl Date: Tue, 12 May 2026 17:44:48 +0200 Subject: [PATCH 6/7] ci(ios): match lib*.a in artifact collection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous filter excluded `*/go-workspace/*` but bidirule.a still slipped through — Go writes some cross-compiled package archives into $GOROOT/pkg// (under ./build/3rdparty/asio-ipfs/golang/...) and $GOCACHE locations that aren't under go-workspace. Matching on the lib*.a prefix instead is a cleaner discriminator: every Beam C++ target produces lib.a, while Go's package archives don't have the prefix, so the filter catches the real iOS static libs and rejects the cgo intermediates regardless of where Go drops them. --- .github/workflows/build.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf1bda4e07..79ee08193e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -347,14 +347,17 @@ jobs: echo BEAM_VERSION = $BEAM_VERSION mkdir -p ${{runner.workspace}}/results/beam-ios/include mkdir -p ${{runner.workspace}}/results/beam-ios/lib - # Skip Go-internal package archives left under asio-ipfs's go-workspace — - # they aren't Mach-O and would break the lipo step below. - find ./build -name \*.a -type f -not -path '*/go-workspace/*' -exec cp {} ${{runner.workspace}}/results/beam-ios/lib/ \; + # Only collect static libraries that follow the lib*.a naming + # convention — that's what every Beam C++ target produces and + # filters out Go's internal package archives (bidirule.a etc.) + # that asio-ipfs's cgo build leaves under GOROOT / GOCACHE. + # lipo below can't read those (they aren't Mach-O). + find ./build -name 'lib*.a' -type f -exec cp {} ${{runner.workspace}}/results/beam-ios/lib/ \; rsync -am --include='*.h' --include='*.hpp' --include='*/' --exclude='*' . ${{runner.workspace}}/results/beam-ios/include/ cp ./build/core/version.h ${{runner.workspace}}/results/beam-ios/include/core/ mkdir -p ${{runner.workspace}}/results/beam-ios-simulator/include mkdir -p ${{runner.workspace}}/results/beam-ios-simulator/lib - find ./build-simulator -name \*.a -type f -not -path '*/go-workspace/*' -exec cp {} ${{runner.workspace}}/results/beam-ios-simulator/lib/ \; + find ./build-simulator -name 'lib*.a' -type f -exec cp {} ${{runner.workspace}}/results/beam-ios-simulator/lib/ \; rsync -am --include='*.h' --include='*.hpp' --include='*/' --exclude='*' . ${{runner.workspace}}/results/beam-ios-simulator/include/ cp ./build/core/version.h ${{runner.workspace}}/results/beam-ios-simulator/include/core/ mkdir -p ${{runner.workspace}}/results/beam-ios-combined/include From f77c1277d241f9d6d6d4fa32b2c94b5b4f72ff1b Mon Sep 17 00:00:00 2001 From: Maxnflaxl Date: Tue, 12 May 2026 19:02:34 +0200 Subject: [PATCH 7/7] ci(ios): prune asio-ipfs Go toolchain dirs from artifact collection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Investigation: extracted the Go 1.16.10 tarball asio-ipfs downloads and found ~400 .a files inside, all under the toolchain root: - go/pkg/darwin_arm64/*.a (prebuilt host std-lib — net.a, bidirule.a) - go/src/**/testdata/*.a (test fixtures — libimportsar.a, etc.) At build time the toolchain extracts into ./build/3rdparty/asio-ipfs/golang/ and uses ./build/3rdparty/asio-ipfs/go-workspace/ as GOPATH. The previous name-based filters (lib*.a, then path-based for go-workspace only) both let some of these through. `lipo -info` looked tempting as a content filter but isn't safe either: Go's net.a in pkg/darwin_arm64/ is a valid arm64-darwin Mach-O archive that lipo happily accepts — combining it into the device slice would silently produce a corrupt library mixing iOS and Darwin objects. Surgical fix: prune both ./build/3rdparty/asio-ipfs/golang/ and ./build/3rdparty/asio-ipfs/go-workspace/ from the find. The two artifacts we actually want from asio-ipfs — libipfs-bindings.a (Go c-archive) and libasio-ipfs.a (C++ wrapper) — live one level above those dirs, so they're still collected. Verified the find expression locally against a synthetic tree mirroring the real layout. --- .github/workflows/build.yml | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79ee08193e..65787f3f84 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -347,17 +347,33 @@ jobs: echo BEAM_VERSION = $BEAM_VERSION mkdir -p ${{runner.workspace}}/results/beam-ios/include mkdir -p ${{runner.workspace}}/results/beam-ios/lib - # Only collect static libraries that follow the lib*.a naming - # convention — that's what every Beam C++ target produces and - # filters out Go's internal package archives (bidirule.a etc.) - # that asio-ipfs's cgo build leaves under GOROOT / GOCACHE. - # lipo below can't read those (they aren't Mach-O). - find ./build -name 'lib*.a' -type f -exec cp {} ${{runner.workspace}}/results/beam-ios/lib/ \; + # asio-ipfs extracts a Go toolchain under 3rdparty/asio-ipfs/golang/ + # (which ships ~400 .a files: pre-built host std-lib under + # pkg/darwin_arm64/ — bidirule.a etc. — plus test fixtures under + # src/.../testdata/ such as libimportsar.a) and uses + # 3rdparty/asio-ipfs/go-workspace/ as GOPATH. None of those are + # the iOS archives we want; lipo below either rejects them + # outright or silently accepts arm64-darwin / arm64-linux + # objects that would corrupt the combined slice. Prune both + # subtrees before collecting. The real asio-ipfs outputs live + # at ./build/3rdparty/asio-ipfs/ipfs_bindings/libipfs-bindings.a + # and ./build/3rdparty/asio-ipfs/libasio-ipfs.a — neither is + # under golang/ or go-workspace/, so they're still picked up. + collect_libs() { + local src_dir="$1" + local dst_dir="$2" + find "$src_dir" \ + \( -path "$src_dir/3rdparty/asio-ipfs/golang" -o \ + -path "$src_dir/3rdparty/asio-ipfs/go-workspace" \) -prune -o \ + -name '*.a' -type f -print0 \ + | xargs -0 -I {} cp {} "$dst_dir/" + } + collect_libs ./build ${{runner.workspace}}/results/beam-ios/lib rsync -am --include='*.h' --include='*.hpp' --include='*/' --exclude='*' . ${{runner.workspace}}/results/beam-ios/include/ cp ./build/core/version.h ${{runner.workspace}}/results/beam-ios/include/core/ mkdir -p ${{runner.workspace}}/results/beam-ios-simulator/include mkdir -p ${{runner.workspace}}/results/beam-ios-simulator/lib - find ./build-simulator -name 'lib*.a' -type f -exec cp {} ${{runner.workspace}}/results/beam-ios-simulator/lib/ \; + collect_libs ./build-simulator ${{runner.workspace}}/results/beam-ios-simulator/lib rsync -am --include='*.h' --include='*.hpp' --include='*/' --exclude='*' . ${{runner.workspace}}/results/beam-ios-simulator/include/ cp ./build/core/version.h ${{runner.workspace}}/results/beam-ios-simulator/include/core/ mkdir -p ${{runner.workspace}}/results/beam-ios-combined/include