Setup the iOS Build Environment
Prepare your build environment
- Install Xcode 15.0 or higher.
- Ensure you have Python 3 installed:
brew install python
- Install linting and formatting tools:
brew install swiftlint
- (Optional, only required for building on the CLI) Install xcpretty:
gem install xcpretty
Setting up Rust
Rust can be installed using rustup
, with the following commands:
curl https://sh.rustup.rs -sSf | sh
rustup update
Platform specific toolchains need to be installed for Rust. This can be
done using the rustup target
command. In order to enable building to real
devices and iOS emulators, the following targets need to be installed:
rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim
Building
This should be relatively straightforward and painless:
- Ensure your repository is up-to-date.
- Ensure Rust is up-to-date by running
rustup update
. - Run a build using the command
make build-swift
- To run tests use
make test-swift
- To run tests use
The above can be skipped if using Xcode. The project directory can be imported and all the build details can be left to the IDE.