The pre-built ONNX Runtime Mobile package includes the NNAPI EP on Android, and the CoreML EP on iOS.
If performing a custom build of ONNX Runtime, support for the NNAPI EP or CoreML EP must be enabled when building.
### Create a minimal build with NNAPI EP or CoreML EP support
Please see [the instructions](../build/android-ios) for setting up the Android or iOS environment required to build. The Android build can be cross-compiled on Windows or Linux. The iOS/macOS build must be performed on a mac machine.
Once you have all the necessary components setup, follow the instructions to [create the custom build](custom-build), with the following changes:
- Replace `--minimal_build` with `--minimal_build extended` to enable support for execution providers that dynamically create kernels at runtime, which is required by the NNAPI EP and CoreML EP.
- Add `--use_nnapi` to include the NNAPI EP in the build
- Add `--use_coreml` to include the CoreML EP in the build
##### Example build commands with the NNAPI EP enabled: