LedgeKitDocs
Developer documentation

Requirements and installation

Add LedgeKit to your application and test targets with Swift Package Manager.

CapabilityPlatform requirement
Core tracing, HTTP delivery, dataset loading, report uploadingiOS 17 or macOS 14 and later
LedgeLanguageModelSessioniOS 26 or macOS 26 and later, with Foundation Models available
The native dataset evaluation exampleiOS 27 or macOS 27 and the Apple Evaluations framework

The package declares Swift tools version 6.0, while the adapter uses newer Swift concurrency syntax. These examples were compiled with Swift 6.4 and the macOS 27 SDK. Use a compatible Xcode toolchain; the native Evaluations example requires the version 27 platform SDK. On-device model execution also requires eligible hardware, Apple Intelligence enabled, and the model ready. Compilation and model availability are separate checks.

Xcode

  1. Choose File → Add Package Dependencies.
  2. Enter https://github.com/noahtovares/ledgekit-ios.
  3. Choose Commit, using 2102e4dd6951d04c2aca7b364f56d0eaac4576f9 for this guide.
  4. Add the LedgeKit product to your app and any test target that imports it.

Authenticate Xcode with a GitHub account that has repository access if prompted. The revision is explicit because these examples do not assume a published release tag. Keep the package resolution checked into your app repository.

Package.swift

Add the dependency and product to your existing manifest:

.package(
    url: "https://github.com/noahtovares/ledgekit-ios",
    revision: "2102e4dd6951d04c2aca7b364f56d0eaac4576f9"
)
.product(name: "LedgeKit", package: "ledgekit-ios")

The package has one library product. Apple Evaluations belongs to your test target; it is not a runtime dependency of LedgeKit.

Check the model before using it

import FoundationModels

if SystemLanguageModel.default.availability == .available {
    // Create a LanguageModelSession and start the request.
} else {
    // Show an appropriate unavailable state in your application.
}

LedgeKit records requests; it does not enable Apple Intelligence or supply a fallback model. Follow Apple's Foundation Models documentation for device readiness and native generation behavior.

On this page