Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
StuartHarris committed Nov 30, 2023
1 parent bd350d9 commit 21790e5
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 10 deletions.
39 changes: 34 additions & 5 deletions docs/src/getting_started/iOS/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,42 @@ Release. If there isn't already a setting for "bridging header" you can add one
When we build our iOS app, we also want to build the Rust core as a static
library so that it can be linked into the binary that we're going to ship.

```admonish
We will use [`cargo-xcode`](https://crates.io/crates/cargo-xcode) to generate an Xcode project for our shared library, which we can add as a sub-project in Xcode.
We will use [`cargo-xcode`](https://crates.io/crates/cargo-xcode) to generate an
Xcode project for our shared library, which we can add as a sub-project in
Xcode.

Recent changes to `cargo-xcode` mean that we need to use version <=1.7.0 for now.
````admonish
If you don't have this already, you can install it with `cargo install --force cargo-xcode --version 1.7.0`.
```
Recent changes to `cargo-xcode` mean that we need to use version <=1.7.0 for
now.
If you don't have this already, you can install it in one of two ways:
1. Globally, with `cargo install --force cargo-xcode --version 1.7.0`
2. Locally, using
[`cargo-run-bin`](https://github.com/dustinblackman/cargo-run-bin), after
ensuring that your `Cargo.toml` has the following lines (see
[The workspace and library manifests](/getting_started/core.html#the-workspace-and-library-manifests)):
```toml
[workspace.metadata.bin]
cargo-xcode = { version = "=1.7.0" }
```
Ensure you have `cargo-run-bin` (and optionally `cargo-binstall`) installed:
```bash
cargo install cargo-run-bin cargo-binstall
```
Then, in the root of your app:
```bash
cargo bin --install # will be faster if `cargo-binstall` is installed
cargo bin --sync-aliases # to use `cargo xcode` instead of `cargo bin xcode`
```
````

Let's generate the sub-project:

Expand Down
39 changes: 34 additions & 5 deletions docs/src/getting_started/iOS/with_xcodegen.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,42 @@ This walk-through assumes you have already added the `shared` and `shared_types`
When we build our iOS app, we also want to build the Rust core as a static
library so that it can be linked into the binary that we're going to ship.

```admonish
We will use [`cargo-xcode`](https://crates.io/crates/cargo-xcode) to generate an Xcode project for our shared library, which we can add as a sub-project in Xcode.
We will use [`cargo-xcode`](https://crates.io/crates/cargo-xcode) to generate an
Xcode project for our shared library, which we can add as a sub-project in
Xcode.

Recent changes to `cargo-xcode` mean that we need to use version <=1.7.0 for now.
````admonish
If you don't have this already, you can install it with `cargo install --force cargo-xcode --version 1.7.0`.
```
Recent changes to `cargo-xcode` mean that we need to use version <=1.7.0 for
now.
If you don't have this already, you can install it in one of two ways:
1. Globally, with `cargo install --force cargo-xcode --version 1.7.0`
2. Locally, using
[`cargo-run-bin`](https://github.com/dustinblackman/cargo-run-bin), after
ensuring that your `Cargo.toml` has the following lines (see
[The workspace and library manifests](/getting_started/core.html#the-workspace-and-library-manifests)):
```toml
[workspace.metadata.bin]
cargo-xcode = { version = "=1.7.0" }
```
Ensure you have `cargo-run-bin` (and optionally `cargo-binstall`) installed:
```bash
cargo install cargo-run-bin cargo-binstall
```
Then, in the root of your app:
```bash
cargo bin --install # will be faster if `cargo-binstall` is installed
cargo bin --sync-aliases # to use `cargo xcode` instead of `cargo bin xcode`
```
````

Let's generate the sub-project:

Expand Down

0 comments on commit 21790e5

Please sign in to comment.