Skip to content

Building iOS

Taner Sener edited this page Jul 15, 2026 · 2 revisions

FFmpegKitNext for iOS and iPadOS can be built with the recommended Nix wrapper or by calling the direct iOS build script.

iPadOS uses the same build artifacts as iOS.

Before building, review iOS Prerequisites. For the full iOS option reference, see nix‐ios.sh.

Build With Nix

Use the Nix wrapper for normal builds, CI builds and reproducible host environments.

./nix-ios.sh --list-profiles
./nix-ios.sh -p xcode26 -x --spm

The wrapper enters the selected Nix profile and then calls scripts/start-ios.sh inside that environment.

Use -x or --xcframework to build xcframework bundles. Use --spm with -x to create a local Package.swift next to the generated xcframeworks. Omit both options if you want framework bundles instead.

Build Without Nix

If you maintain Xcode and the host tools yourself, call the direct script from the project root:

./scripts/start-ios.sh -x --spm

The direct script uses the environment described in iOS Prerequisites.

Build Options

The same iOS build options can be passed to both commands. For example:

./nix-ios.sh -p xcode26 -x --spm --enable-fontconfig --disable-arm64e
./scripts/start-ios.sh -x --spm --enable-fontconfig --disable-arm64e

Use --enable-gpl when enabling GPL-licensed libraries such as x264, x265, xvidcore, libvidstab or rubberband.

The complete option list is documented in nix‐ios.sh.

Build Flow

The iOS build has two phases:

  1. Build FFmpeg, FFmpegKitNext and enabled external libraries for the enabled iOS, simulator and Mac Catalyst architectures.
  2. Package the generated binaries into framework bundles or xcframework bundles, and optionally create a local Swift package manifest.

Build Output

Build outputs are written under prebuilt.

Common output folders are:

prebuilt/bundle-apple-xcframework-ios-12.1/
prebuilt/bundle-apple-framework-ios-12.1/
prebuilt/bundle-apple-framework-iphoneos-12.1/
prebuilt/bundle-apple-framework-iphonesimulator-12.1/
prebuilt/bundle-apple-framework-mac-catalyst-14.0/

When --spm is used, Package.swift is created in the generated xcframework folder.

Clone this wiki locally