onnxruntime/docs/build/ios.md
Rachel Guo 00d3d477e5
Update ios.md with updated arguments name (#19528)
### Description
<!-- Describe your changes. -->




### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

#19526
2024-02-15 13:58:02 -08:00

1.9 KiB

title parent nav_order
Build for iOS Build ONNX Runtime 5

Build ONNX Runtime for iOS

{: .no_toc }

Follow the instructions below to build ONNX Runtime for iOS.

Contents

{: .no_toc }

  • TOC placeholder {:toc}

General Info

  • iOS Platforms

    The following two platforms are supported

    • iOS device (iPhone, iPad) with arm64 architecture
    • iOS simulator with x86_64 architecture

    The following platforms are not supported

    • armv7
    • armv7s
    • i386 architectures
    • tvOS
    • watchOS platforms are not currently supported.
  • apple_deploy_target

    Specify the minimum version of the target platform (iOS) on which the target binaries are to be deployed.

Prerequisites

Build Instructions

Run one of the following build scripts from the ONNX Runtime repository root:

Cross compile for iOS simulator

./build.sh --config <Release|Debug|RelWithDebInfo|MinSizeRel> --use_xcode \
           --ios --apple_sysroot iphonesimulator --osx_arch x86_64 --apple_deploy_target <minimal iOS version>

Cross compile for iOS device

./build.sh --config <Release|Debug|RelWithDebInfo|MinSizeRel> --use_xcode \
           --ios --apple_sysroot iphoneos --osx_arch arm64 --apple_deploy_target <minimal iOS version>

CoreML Execution Provider

If you want to use CoreML Execution Provider on iOS or macOS, see CoreML Execution Provider.

Build Instructions

CoreML Execution Provider can be built using building commands in iOS Build instructions with --use_coreml

Building a Custom iOS Package

Refer to the documentation for custom builds. In particular, see the section about the iOS Package.