Skip to content

Commit 2a0a2f8

Browse files
Update iOS SwiftPM docs for ExecuTorch 1.0.0 (pytorch#19565)
Part of pytorch#17425. This refreshes the iOS SwiftPM documentation for the ExecuTorch 1.0.0 package flow. Changes: - Updates the remaining `swiftpm-0.6.0` guidance in the getting started page to use `swiftpm-1.0.0`. - Clarifies the Xcode product selection step for the simple XNNPACK app path. - Refreshes the Xcode package-product screenshot and demo video assets for the `swiftpm-1.0.0` flow. Validation: - `git diff --check` - Verified `docs/source/_static/img/swiftpm_xcode.mp4` duration is 94.37s at 1280x836 and sampled frames through package selection. cc @mergennachin @AlannaBurke @shoumikhin @cbilgin
1 parent 30c9a26 commit 2a0a2f8

4 files changed

Lines changed: 3 additions & 3 deletions

File tree

4.14 MB
Binary file not shown.
161 KB
Loading

docs/source/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ For a full example of running a model on Android, see the [DeepLabV3AndroidDemo]
160160
#### Installation
161161
ExecuTorch supports both iOS and macOS via C++, as well as hardware backends for CoreML, MPS, and CPU. The iOS runtime library is provided as a collection of .xcframework targets and are made available as a Swift PM package.
162162

163-
To get started with Xcode, go to File > Add Package Dependencies. Paste the URL of the ExecuTorch repo into the search bar and select it. Make sure to change the branch name to the desired ExecuTorch version in format “swiftpm-”, (e.g.swiftpm-0.6.0”). The ExecuTorch dependency can also be added to the package file manually. See [Using ExecuTorch on iOS](using-executorch-ios.md) for more information.
163+
To get started with Xcode, go to `File > Add Package Dependencies`. Paste the URL of the ExecuTorch repo into the search bar and select it. Make sure to change the dependency rule to a branch named for the desired ExecuTorch version (e.g., `swiftpm-1.0.0`). The ExecuTorch dependency can also be added to the package file manually. See [Using ExecuTorch on iOS](using-executorch-ios.md) for more information.
164164

165165
#### Runtime APIs
166166
Models can be loaded and run from Objective-C using the C++ APIs.

docs/source/using-executorch-ios.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ The prebuilt ExecuTorch runtime, backend, and kernels are available as a [Swift
2828

2929
#### Xcode
3030

31-
In Xcode, go to `File > Add Package Dependencies`. Paste the URL of the [ExecuTorch repo](https://github.com/pytorch/executorch) into the search bar and select it. Make sure to change the branch name to the desired ExecuTorch version in format "swiftpm-<version>", (e.g. "swiftpm-1.0.0"), or a branch name in format "swiftpm-<version>.<year_month_date>" (e.g. "swiftpm-1.1.0-20251101") for a [nightly build](https://ossci-ios.s3.amazonaws.com/list.html) on a specific date.
31+
In Xcode, go to `File > Add Package Dependencies`. Paste the URL of the [ExecuTorch repo](https://github.com/pytorch/executorch) into the search bar and select it. Change the dependency rule to a branch named for the desired ExecuTorch version (e.g., `swiftpm-1.0.0`), or use a branch name in the format `swiftpm-<version>.<year_month_day>` for a [nightly build](https://ossci-ios.s3.amazonaws.com/list.html) on a specific date (e.g., `swiftpm-1.1.0.20251101`).
3232

3333
![](_static/img/swiftpm_xcode1.png)
3434

35-
Then select which ExecuTorch framework should link against which target.
35+
Then select the ExecuTorch products that your app needs. For a simple app using the XNNPACK backend, link the app target against `executorch`, `backend_xnnpack`, and `kernels_optimized`. The `executorch` product provides the core runtime; for Core ML, MPS, or other execution paths, choose the matching backend and kernel products from the product list above.
3636

3737
![](_static/img/swiftpm_xcode2.png)
3838

0 commit comments

Comments
 (0)