-
Notifications
You must be signed in to change notification settings - Fork 25
Importing tvOS Frameworks
FFmpegKitNext artifacts are produced locally. Build the tvOS package by following Building tvOS, then add the generated local package, xcframeworks or framework bundles to your Xcode project.
Use this option for new Xcode projects and for projects that can consume a local package.
-
In Xcode, select
File->Add Package Dependencies. -
Choose
Add Local.... -
Select the generated folder, for example:
prebuilt/bundle-apple-xcframework-tvos-11.0/ -
Add the
ffmpeg-kitpackage product to the tvOS app target. -
Import the module from Swift:
import ffmpegkit
For Objective-C sources, include the framework header:
#include <ffmpegkit/FFmpegKit.h>Regenerate the package after changing enabled libraries, architectures, build type or deployment target. The
Package.swift references the local xcframeworks by relative path, so keep the generated folder together with the
framework bundles it was created for.
Use this option when you do not want to add the local Swift package.
Build with -x or --xcframework, then add every generated xcframework from the tvOS output folder to the app
target:
ffmpegkit.xcframework
libavcodec.xcframework
libavdevice.xcframework
libavfilter.xcframework
libavformat.xcframework
libavutil.xcframework
libswresample.xcframework
libswscale.xcframework
In General -> Frameworks, Libraries and Embedded Content, set the generated xcframeworks to Embed & Sign for
the final app target. If they are not copied into the Xcode project, make sure Framework Search Paths points to the
generated output folder.
If you build without -x, framework bundles are created under folders named like:
prebuilt/bundle-apple-framework-tvos-11.0/
Add all generated .framework bundles from that folder, not only ffmpegkit.framework.
For app targets, embed and sign the generated frameworks. Add a Run Script phase after Embed Frameworks so unsupported
slices are removed from the final app bundle:
${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/ffmpegkit.framework/strip-frameworks.shAlways link ffmpegkit together with all generated FFmpeg libraries listed above. If your build enables platform/system
options, Xcode may also need the corresponding Apple framework or system library:
-
--enable-tvos-audiotoolbox:AudioToolbox -
--enable-tvos-bzip2:libbz2 -
--enable-tvos-libiconv:libiconv -
--enable-tvos-videotoolbox:VideoToolbox -
--enable-tvos-zlib:libz
Some external library combinations may add more link requirements. For example, rubberband and tesseract link
Accelerate.
- Do not mix frameworks from different builds, deployment targets or enabled-library sets
- Rebuild and re-import the artifacts after changing build options
Copyright (c) 2026 FFmpegKitNext
- Status
- Versions
- Changelog
- Project Layout
- Using
- Building
- External Libraries
- Patents
- License