What is an XCFramework?
An XCFramework is a bundle format from Apple, carrying the .xcframework extension, that packages a precompiled binary framework or library for multiple platforms and CPU architectures in one distributable unit. It is how a library author ships compiled code that works across iPhone, iPad simulator, Mac, and more without the consumer needing the source.
What an XCFramework contains
Inside an XCFramework is a set of slices, one per platform and architecture combination it supports, plus a manifest that tells Xcode which slice to use in a given build. That structure is what makes it multi-platform: a single bundle can carry an iOS device slice, an iOS simulator slice, and slices for other Apple platforms side by side. When you add the XCFramework to a project, Xcode automatically selects the right slice for whatever you are building, so you do not manage architectures by hand.
How XCFrameworks are built and used
An author archives the framework for each platform they want to support, then merges those archives with the xcodebuild create-xcframework command, which produces the .xcframework bundle. From there it can be distributed in a few ways: dropped into a project directly, referenced as a binary target in a Swift package, or delivered through a dependency manager. This replaced the older fat-binary and universal-framework techniques, which broke down once iOS device and simulator could share the same CPU architecture, since a single combined binary could no longer tell them apart.
XCFrameworks, dependencies, and AppFlight
XCFrameworks matter mostly when you depend on a closed-source SDK, since open-source libraries are often shipped as Swift package source instead. AppFlight builds native Swift and SwiftUI apps and wires in integrations such as RevenueCat, Superwall, Supabase, and Sentry, whose SDKs are distributed through Swift Package Manager or as binary frameworks like XCFrameworks. For most app builders the format works behind the scenes, surfacing only if a particular SDK is delivered as a precompiled binary.
FAQ
Why use an XCFramework instead of a plain framework?
A single XCFramework can hold slices for different platforms and architectures, such as iOS device and iOS simulator, without the old fat-binary workarounds. It replaced the universal-framework approach Apple no longer recommends, which matters now that device and simulator can share an architecture.
How do you create an XCFramework?
You archive your framework for each platform you support, then combine the archives with the xcodebuild create-xcframework command. The result is a .xcframework you can distribute directly or reference from a Swift package or a dependency manager.
Is an XCFramework the same as a Swift package?
No. A Swift package is a way to distribute and resolve dependencies, often as source. An XCFramework is a precompiled binary bundle. A Swift package can point at a binary target that is an XCFramework, which is how many closed-source SDKs ship.