mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-12 16:08:59 +02:00
The #2585 absorb updated DebugBridgeTouch.m.template and Package.swift.template but not their FixtureApp mirrors, failing the template↔fixture parity gate. DebugBridgeTouch.m syncs byte-for-byte; the fixture Package.swift takes only the template's new cSettings DEBUG define on the Touch target (the fixture's own testTarget is fixture-only content the parity normalization deliberately ignores — a naive full copy breaks the XCTest invariant). 23/23 including the real swift build. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
64 lines
2.3 KiB
Swift
64 lines
2.3 KiB
Swift
// swift-tools-version:5.9
|
|
// Test fixture: minimal SwiftUI app + DebugBridge SPM package.
|
|
// DebugBridgeCore (Foundation+Network) builds cross-platform.
|
|
// DebugBridgeUI (UIKit/SwiftUI) is iOS-only.
|
|
// DebugBridgeTouch (Objective-C) is iOS-only — in-process tap synthesis
|
|
// derived from KIF (MIT). DEBUG-only.
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "FixtureApp",
|
|
platforms: [
|
|
.iOS(.v16),
|
|
.macOS(.v13),
|
|
],
|
|
products: [
|
|
.library(name: "DebugBridgeCore", targets: ["DebugBridgeCore"]),
|
|
.library(name: "DebugBridgeUI", targets: ["DebugBridgeUI"]),
|
|
.library(name: "DebugBridgeTouch", targets: ["DebugBridgeTouch"]),
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: "DebugBridgeCore",
|
|
dependencies: [],
|
|
path: "Sources/DebugBridgeCore",
|
|
swiftSettings: [
|
|
.define("DEBUG", .when(configuration: .debug)),
|
|
]
|
|
),
|
|
.target(
|
|
name: "DebugBridgeTouch",
|
|
dependencies: [],
|
|
path: "Sources/DebugBridgeTouch",
|
|
publicHeadersPath: "include",
|
|
cSettings: [
|
|
// Explicit, because the source guard depends on it. SwiftPM's
|
|
// implicit DEBUG for C-family targets is not something to bet a
|
|
// private-API exposure on — the two Swift targets already declare
|
|
// it, and this target is the one that actually links private API.
|
|
.define("DEBUG", .when(configuration: .debug)),
|
|
],
|
|
linkerSettings: [
|
|
// IOKit is loaded dynamically via dlopen at runtime (it's a
|
|
// private framework on iOS and can't be linked statically).
|
|
// UIKit links normally.
|
|
.linkedFramework("UIKit", .when(platforms: [.iOS])),
|
|
]
|
|
),
|
|
.target(
|
|
name: "DebugBridgeUI",
|
|
dependencies: ["DebugBridgeCore", "DebugBridgeTouch"],
|
|
path: "Sources/DebugBridgeUI",
|
|
swiftSettings: [
|
|
.define("DEBUG", .when(configuration: .debug)),
|
|
]
|
|
),
|
|
.testTarget(
|
|
name: "DebugBridgeCoreTests",
|
|
dependencies: ["DebugBridgeCore"],
|
|
path: "Tests/DebugBridgeCoreTests"
|
|
),
|
|
]
|
|
)
|