Files
gstack/test/fixtures/ios-qa/FixtureApp/Package.swift
T
Garry TanandClaude Fable 5 33a55562f7 fix(ios-qa): compile the private-API touch bridge out of Release builds
PR #2264 claimed DebugBridgeTouch.m (KIF-derived in-process touch synthesis
using private UIKit/IOKit symbols: _touchesEvent, IOHIDEventCreateDigitizer*,
_AXSSetAutomationEnabled) was "compiled out in Release," but the body was gated
only by TARGET_OS_IOS, so a Release iOS build carried the private symbols (App
Store rejection risk). The safety half of the fix (closed PR #2269) never
landed. Gate the body on `#if TARGET_OS_IOS && DEBUG` and add the cSettings
DEBUG define to the DebugBridgeTouch target so `#if DEBUG` is true in debug and
false in release (mirrors the Core/UI swiftSettings). A free static tripwire
pins both halves; the nm/strings symbol proof needs an iOS-SDK build and belongs
in the device/periodic tier.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 10:14:33 -07:00

57 lines
1.8 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: [
.define("DEBUG", .when(configuration: .debug)),
],
linkerSettings: [
.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"
),
]
)