Add SPM

Add DynamicLakeKit to a companion app and ExtensionKit extension with Swift Package Manager.

Overview

Use SPM for new DynamicLake extension projects. It keeps DynamicLakeKit versioned with the project and avoids manually copying framework builds between targets.

!Xcode Add Package Dependencies screen with the DynamicLakeKit repository selected.

Add The Package In Xcode

  1. Open the app project in Xcode.
  2. Choose File > Add Package Dependencies.
  3. Paste the public DynamicLakeKit repository URL.
  4. Select the version rule you want to use.
  5. Add the DynamicLakeKit product to the companion app target.
  6. Add the DynamicLakeKit product to the ExtensionKit extension target.

Both targets need the package product because the companion app posts activity state and the extension renders DynamicLake UI.

Update The Package In Xcode

When a new DynamicLakeKit version is released:

  1. Open the app project in Xcode.
  2. Choose File > Packages > Update to Latest Package Versions.
  3. Confirm DynamicLakeKit resolves to the expected version.
  4. Build the companion app target and the extension target.
  5. Update DynamicLakeExtensionMinimumDynamicLakeKitVersion if the extension now requires the newer SDK.

Use an exact version rule when you need fully repeatable builds. Use an up-to-next-major version rule when you want compatible DynamicLakeKit fixes to resolve automatically.

Add The Package In Package.swift

If the project is itself a Swift package, add DynamicLakeKit to dependencies:

dependencies: [
    .package(name: "DynamicLakeKit", url: "https://github.com/rokach/DynamicLakeKit---Dynamic-Island-Kit-for-Mac.git", from: "1.0.0")
]

Then add the product to every target that imports DynamicLakeKit:

dependencies: [
    .product(name: "DynamicLakeKit", package: "DynamicLakeKit")
]

To update from Package.swift, change the version requirement when needed, then run:

swift package update DynamicLakeKit

Verify Imports

The companion app target should compile with:

import DynamicLakeKit

The extension target should compile with:

import DynamicLakeKit
import SwiftUI

If Xcode still shows No such module 'DynamicLakeKit', confirm the package product is added to the target that owns the file with the import, then clean the build folder and rebuild.

Manual Framework Fallback

If you use a prebuilt DynamicLakeKit.framework or DynamicLakeKit.xcframework instead of SPM, link DynamicLakeKit from both targets and embed/sign it in the companion app target. SPM is preferred for public integration projects.