Shows how to use Algonaut in a native iOS app.
- Rust core (shareable with other platforms, e.g. web), with domain logic and services, like accessing Algonaut.
- Native app (SwiftUI, etc.)
Install rust-bitcode (currently used: nightly-2021-02-25)
As the binaries are not signed, you'll have to convince macOS that it's safe to run them. One solution is to do the following:
cd algonaut_ios/ios_app
cargo +ios-arm64-nightly-2021-02-25 build --target aarch64-apple-ios --release --lib
- if it fails because macOS doesn't trust the binary, go to
System Preferences -> Security & Privacy
andAllow to run binary
then go to 2.
Run the project in Xcode. This will build Rust and start the app.
- Fork
- Commit changes to a branch in your fork
- Push your code and make a pull request
Based on https://github.com/i-schuetz/rust_android_ios. Modifications: Algonaut integration, conversion from async to blocking in FFI interface, Android removed.
* It has been tested on real devices but not uploaded to the App Store or distributed. It should™ work, but just in case. If you use an app based on this example in production, please let me know: [email protected] or issues