Skip to content

Update demo-apps-ios.md #10146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 14, 2025
Merged
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
34 changes: 13 additions & 21 deletions docs/source/demo-apps-ios.md
Original file line number Diff line number Diff line change
@@ -38,10 +38,9 @@ python3 --version
pip --version
```

### 3. Getting Started Tutorial
### 3. Set Up ExecuTorch

Follow the [Setting Up ExecuTorch](https://pytorch.org/executorch/stable/getting-started-setup)
tutorial to configure the basic environment:
Clone ExecuTorch and set up the environment as explained in the [Building from Source](using-executorch-building-from-source.md) tutorial:

```bash
git clone -b viable/strict https://github.com/pytorch/executorch.git && cd executorch
@@ -51,22 +50,19 @@ python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip
./install_executorch.sh
```

### 4. Clone the Demo App
### 4. Backend Dependencies

Install additional dependencies for [Core ML](backends-coreml.md) and [MPS](backends-mps.md) backends:

```bash
git clone --depth 1 https://github.com/pytorch-labs/executorch-examples.git
./backends/apple/coreml/scripts/install_requirements.sh
./backends/apple/mps/install_requirements.sh
```

### 5. Backend Dependencies

Also, follow the corresponding sections from [Core ML](https://pytorch.org/executorch/stable/build-run-coreml) and
[MPS](https://pytorch.org/executorch/stable/build-run-mps) tutorials to install additional dependencies for those
backends:
### 5. Clone the Demo App

```bash
./backends/apple/coreml/scripts/install_requirements.sh

./backends/apple/mps/install_requirements.sh
git clone --depth 1 https://github.com/pytorch-labs/executorch-examples.git
```

## Models and Labels
@@ -101,10 +97,9 @@ curl https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt \
-o "$APP_PATH/Resources/Models/MobileNet/imagenet_classes.txt"
```

## Final Steps
## Build and Run the App

We're almost done! Now, we just need to open the project in Xcode, run the
tests, and finally run the app.
We're almost done! Now, we just need to open the project in Xcode, run the tests, and finally run the app.

### 1. Open Project in Xcode

@@ -116,8 +111,7 @@ open $APP_PATH.xcodeproj

### 2. Run Tests

You can run tests on Simulaltor directly in Xcode with `Cmd + U` or use the
command line:
You can run tests on Simulaltor directly in Xcode with `Cmd + U` or use the command line:

```bash
xcrun simctl create executorch "iPhone 15"
@@ -136,6 +130,4 @@ using `Cmd + R`. Try installing a Release build for better performance.
Congratulations! You've successfully set up the ExecuTorch iOS Demo App. Now,
you can explore and enjoy the power of ExecuTorch on your iOS device!

Learn more about integrating and running [ExecuTorch on Apple](https://pytorch.org/executorch/stable/apple-runtime) platforms.

![](_static/img/demo_ios_xcode.jpg)
Learn more about [Using ExecuTorch on iOS](using-executorch-ios.md).