diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index f4a55aa9e5..1f75024641 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit f4a55aa9e5b6066428402291ed228aa0dd921534 +Subproject commit 1f75024641af15621353a645c5b23222efb56034 diff --git a/crypto_plugins/flutter_libmwc b/crypto_plugins/flutter_libmwc index c8db22aed2..c7913abc2b 160000 --- a/crypto_plugins/flutter_libmwc +++ b/crypto_plugins/flutter_libmwc @@ -1 +1 @@ -Subproject commit c8db22aed2c50aa1e95dfc532abb0a4961c543d7 +Subproject commit c7913abc2b2e02a3f66472f88397071a93300743 diff --git a/crypto_plugins/frostdart b/crypto_plugins/frostdart index 395765297a..fb4ae7f576 160000 --- a/crypto_plugins/frostdart +++ b/crypto_plugins/frostdart @@ -1 +1 @@ -Subproject commit 395765297a52c5f867ae6256636cf51e0ad20876 +Subproject commit fb4ae7f57690df8f6ebfdaf79e7c5d23f83b711b diff --git a/docs/building.md b/docs/building.md index af2d328a94..ac8c6930c3 100644 --- a/docs/building.md +++ b/docs/building.md @@ -253,6 +253,47 @@ flutter pub get flutter run ios ``` +#### iOS Simulator (arm64/Apple Silicon) +Running on the iOS Simulator requires simulator (aarch64-apple-ios-sim) +slices for every native dependency. The crypto plugin submodules build +device-only static libraries by default; simulator slices must be built +additionally and are packaged as XCFrameworks: + +``` +# after running scripts/ios/build_all.sh or download_all.sh (device slices): +(cd crypto_plugins/frostdart/scripts/ios && ./build_all.sh) # builds both slices +(cd crypto_plugins/flutter_libepiccash/scripts/ios && ./build_sim.sh) +(cd crypto_plugins/flutter_libmwc/scripts/ios && ./build_sim.sh) +``` + +The remaining native deps are handled as follows: + +- `flutter_libsparkmobile`, `cs_salvium_flutter_libs_ios`: already ship + arm64 simulator slices in their XCFrameworks. +- `tor_ffi_plugin`, `xelis_flutter`: built per-SDK by cargokit at pod + build time; no changes needed. +- `flutter_mwebd`: builds both slices as an XCFramework at pod install + time (requires Go) when using the simulator-enabled fork. +- `cs_monero_flutter_libs_ios`, `cs_wownero_flutter_libs_ios`: build the + simulator dylib from the respective monero_c tree with + `./build_single.sh aarch64-apple-iossimulator -j8` and package it + with the device slice via `tools/dart/bin/build_libs.dart ios` + (cs_monero) or the equivalent tooling in cs_wownero. + +`ios/Podfile` excludes `i386 x86_64` for `iphonesimulator` on all pod +targets, so simulator builds are arm64-only (Apple Silicon). On Xcode 26, +if `xcodebuild` reports no available simulator destinations or +"iOS is not installed", install the matching simulator runtime +with `xcodebuild -downloadPlatform iOS`. + +The simulator-enabled `flutter_mwebd`, `cs_monero_flutter_libs_ios`, and +`cs_wownero_flutter_libs_ios` changes are pinned to their review commits in +the app-config template. Update those refs to their merged commits or package +releases before readying this PR. `flutter_libsparkmobile` already ships its +simulator slice and needs no local override. + +Then run against a booted simulator as usual (`flutter run`). + #### macOS Run the following commands or launch via Android Studio: ``` diff --git a/ios/Podfile b/ios/Podfile index f17bddc919..00dcb91c1d 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -37,5 +37,11 @@ end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) + target.build_configurations.each do |config| + # Several vendored crypto libraries ship arm64-only simulator slices; + # exclude x86_64 (and legacy i386) so simulator builds on Apple Silicon + # don't try to build/link missing x86_64 slices. + config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'i386 x86_64' + end end end diff --git a/pubspec.lock b/pubspec.lock index e85d3e8109..9a2cecefaa 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -477,13 +477,14 @@ packages: source: hosted version: "1.3.0" cs_monero_flutter_libs_ios: - dependency: transitive + dependency: "direct overridden" description: - name: cs_monero_flutter_libs_ios - sha256: dbc149c0787a7702a3842b4974b9bc30bad654daaa57886f874823c29c390ba7 - url: "https://pub.dev" - source: hosted - version: "1.3.0" + path: cs_monero_flutter_libs_ios + ref: d89ab9f9bc18fa610c8bd629ad8fbbfc7a0c6d5b + resolved-ref: d89ab9f9bc18fa610c8bd629ad8fbbfc7a0c6d5b + url: "https://github.com/cypherstack/cs_monero" + source: git + version: "1.0.0" cs_monero_flutter_libs_linux: dependency: transitive description: @@ -653,12 +654,13 @@ packages: source: hosted version: "1.2.0" cs_wownero_flutter_libs_ios: - dependency: transitive + dependency: "direct overridden" description: - name: cs_wownero_flutter_libs_ios - sha256: "9ffd158469a0a45668d89ce56b90e846dd823ffd44ee6997b50b76129e6f613c" - url: "https://pub.dev" - source: hosted + path: cs_wownero_flutter_libs_ios + ref: 8cf5b879126dd8f11bde632ef8e7d2f088d95988 + resolved-ref: 8cf5b879126dd8f11bde632ef8e7d2f088d95988 + url: "https://github.com/cypherstack/cs_wownero" + source: git version: "1.3.0" cs_wownero_flutter_libs_linux: dependency: transitive @@ -1060,10 +1062,11 @@ packages: flutter_mwebd: dependency: "direct main" description: - name: flutter_mwebd - sha256: "14f2a331b2621b78ddf62081ca8a466f6a2b4352a66950fffd68615c14e63edf" - url: "https://pub.dev" - source: hosted + path: "." + ref: 17dc80f56abd055c96b4e064b7bb6e06f1ef8233 + resolved-ref: 17dc80f56abd055c96b4e064b7bb6e06f1ef8233 + url: "https://github.com/cypherstack/flutter_mwebd" + source: git version: "0.0.1-pre.11" flutter_native_splash: dependency: "direct main" diff --git a/scripts/app_config/templates/pubspec.template.yaml b/scripts/app_config/templates/pubspec.template.yaml index 61556b0174..a26144480e 100644 --- a/scripts/app_config/templates/pubspec.template.yaml +++ b/scripts/app_config/templates/pubspec.template.yaml @@ -356,6 +356,29 @@ dependency_overrides: freezed: ^3.1.0 freezed_annotation: ^3.1.0 +# %%ENABLE_XMR%% +# cs_monero_flutter_libs_ios: +# git: +# url: https://github.com/cypherstack/cs_monero +# path: cs_monero_flutter_libs_ios +# ref: d89ab9f9bc18fa610c8bd629ad8fbbfc7a0c6d5b +# %%END_ENABLE_XMR%% + +# %%ENABLE_WOW%% +# cs_wownero_flutter_libs_ios: +# git: +# url: https://github.com/cypherstack/cs_wownero +# path: cs_wownero_flutter_libs_ios +# ref: 8cf5b879126dd8f11bde632ef8e7d2f088d95988 +# %%END_ENABLE_WOW%% + +# %%ENABLE_MWEBD%% +# flutter_mwebd: +# git: +# url: https://github.com/cypherstack/flutter_mwebd +# ref: 17dc80f56abd055c96b4e064b7bb6e06f1ef8233 +# %%END_ENABLE_MWEBD%% + # %%ENABLE_ISAR%% # isar_community: # git: