mirror of https://github.com/garrytan/gstack.git
Fixes five template bugs that break a fresh `/ios-qa` DebugBridge install on
Swift 6.x toolchains, the most serious of which compiles private
UITouch/UIEvent/IOKit SPIs into iOS Release builds (App Store Guideline 2.1
rejection class).
1. gen-accessors-tool/Package.swift: drop the GenAccessorsTests testTarget —
Tests/ doesn't exist, so `swift build` failed with "invalid custom path".
2. Package.swift.template: move `// swift-tools-version:5.9` to line 1. Swift
6.0+ rejects a misplaced directive ("manifest is backward-incompatible with
Swift < 6.0").
3. Package.swift.template: drop the DebugBridgeCoreTests testTarget — never
populated by the installer; same invalid-custom-path failure.
4. Delete DebugBridgeWiring.swift.template — it imported a non-existent
`DebugBridge` module, referenced symbols that don't exist
(AccessibilityScanner/SnapshotCapture/MutationDispatcher), and called a
start(appState:recording:) overload that doesn't exist. Bridges.swift's
`DebugBridgeUIWiring.installAll()` already does the real wiring; updated the
DebugBridgeManager comment (template + fixture) to point there.
5. DebugBridgeTouch.m.template: gate the iOS impl behind
`#if TARGET_OS_IOS && defined(DEBUG)` (was `#if TARGET_OS_IOS`), and add a
cSettings DEBUG define to the DebugBridgeTouch target in
Package.swift.template. swiftSettings do not reach Obj-C translation units,
so the prior gate leaked the private SPIs into iOS Release binaries — the
exact failure that forced a DebugBridge removal downstream.
Fixture parity: applied the same .m gate + Package cSettings to the FixtureApp
so the template↔fixture parity test stays green, and added host-independent
static guards (gate present, cSettings present, tools-version on line 1) to
test/skill-e2e-ios-swift-build.test.ts — the iOS-Release leak can't be caught
by the macOS nm-scan since DebugBridgeTouch links UIKit.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| Sources | ||
| Tests/DebugBridgeCoreTests | ||
| .gitignore | ||
| Package.swift | ||
| project.yml | ||