// swift-tools-version: 6.0 import PackageDescription // LCECryptoKit ships as a prebuilt .xcframework (`Frameworks/LCECryptoKit.xcframework`) — // vendored locally in this repo, no remote package dependency. iOS device + simulator slices // only. // // Sub-SPM rule: `LCEssentials` installs standalone (no sub required). Every sub // (`LCECryptoKit`, `LCFeatureControl`) target-depends on `LCEssentials`, so linking the sub's // product always pulls `LCEssentials` in too — a consumer never has to declare it separately. // // Platforms are iOS + watchOS only: `LCEssentials.API` (used by `LCFeatureControl`) is // `#if os(iOS) || os(watchOS)`, and the vendored xcframework has no macOS/tvOS slice. let package = Package( name: "LCEssentials", platforms: [ .iOS(.v15), .watchOS(.v8) ], products: [ .library( name: "LCEssentials", targets: ["LCEssentials"]), .library( name: "LCECryptoKit", targets: ["LCECryptoKitManager"]), .library( name: "LCFeatureControl", targets: ["LCFeatureControl"]), ], targets: [ .target( name: "LCEssentials"), .binaryTarget( name: "LCECryptoKit", path: "Frameworks/LCECryptoKit.xcframework"), .target( name: "LCECryptoKitManager", dependencies: [ "LCEssentials", "LCECryptoKit" ]), .target( name: "LCFeatureControl", dependencies: ["LCEssentials"]), .testTarget( name: "LCEssentialsTests", dependencies: ["LCEssentials"]), .testTarget( name: "LCFeatureControlTests", dependencies: ["LCFeatureControl", "LCEssentials"]), ] )