Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crypto_plugins/frostdart
41 changes: 41 additions & 0 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <coin> 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 <version> 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:
```
Expand Down
6 changes: 6 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
33 changes: 18 additions & 15 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
23 changes: 23 additions & 0 deletions scripts/app_config/templates/pubspec.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading