0Pricing
Swift Academy · Lesson

Binary Targets and XCFrameworks

Distributing closed-source code as XCFramework and consuming as a binary target.

What is a Binary Target?

A binary target distributes a precompiled framework (XCFramework) instead of source code, protecting proprietary implementations.

// Package.swift:
.binaryTarget(
  name: "ClosedSDK",
  path: "Frameworks/ClosedSDK.xcframework"
)

What is an XCFramework?

An XCFramework bundles multiple platform slices (iOS, macOS, simulator) into a single distributable archive.

// XCFramework structure:
// ClosedSDK.xcframework/
// ├── ios-arm64/
// ├── ios-arm64_x86_64-simulator/
// └── macos-arm64_x86_64/

All lessons in this course

  1. Package.swift: Targets, Products and Dependencies
  2. Local Packages and Feature Modules
  3. Binary Targets and XCFrameworks
  4. Versioning, Resolving Conflicts and Swift Plugins
← Back to Swift Academy