feat(ios): W0 scaffold + day-1 spike + WireProtocol frozen contract + TestSupport doubles
T-iOS-1: ios/ XcodeGen project (iOS 17, Swift 6 strict concurrency, ATS per PLAN §5.2), 5 SPM package shells, CI skeleton T-iOS-2: Origin spike vs real server — URLSessionWebSocketTask custom Origin CONFIRMED (no Starscream); 16MiB replay + EMSGSIZE(40) errno correction written back to plan T-iOS-3: WireProtocol frozen contract, 59 tests, 100% line coverage, cross-impl vectors vs src/protocol.ts via tsx T-iOS-4: FakeTransport/FakeClock/FakeHTTPTransport doubles Verify: independent agent re-ran all acceptance — 6/6 PASS
This commit is contained in:
93
ios/project.yml
Normal file
93
ios/project.yml
Normal file
@@ -0,0 +1,93 @@
|
||||
# XcodeGen project spec — regenerate with: cd ios && xcodegen generate
|
||||
# The generated WebTerm.xcodeproj is NOT committed (see ios/.gitignore).
|
||||
#
|
||||
# TOOLCHAIN DEVIATION (recorded per plan §7 T-iOS-1): the plan names
|
||||
# "default MainActor isolation" (SWIFT_DEFAULT_ACTOR_ISOLATION), which is
|
||||
# Swift 6.2+/Xcode 26 only. On Swift 6.1 / Xcode 16.3 the closest supported
|
||||
# equivalent is Swift 6 language mode + strict concurrency, with explicit
|
||||
# @MainActor annotations where isolation is required.
|
||||
name: WebTerm
|
||||
|
||||
options:
|
||||
bundleIdPrefix: com.yaojia
|
||||
deploymentTarget:
|
||||
iOS: "17.0"
|
||||
createIntermediateGroups: true
|
||||
|
||||
settings:
|
||||
base:
|
||||
SWIFT_VERSION: "6.0" # Swift 6 language mode
|
||||
SWIFT_STRICT_CONCURRENCY: complete
|
||||
IPHONEOS_DEPLOYMENT_TARGET: "17.0"
|
||||
TARGETED_DEVICE_FAMILY: "1" # iPhone only (iPad layout is out of v1 scope)
|
||||
CODE_SIGN_STYLE: Automatic
|
||||
|
||||
packages:
|
||||
WireProtocol:
|
||||
path: Packages/WireProtocol
|
||||
SessionCore:
|
||||
path: Packages/SessionCore
|
||||
HostRegistry:
|
||||
path: Packages/HostRegistry
|
||||
APIClient:
|
||||
path: Packages/APIClient
|
||||
# SwiftTerm is the ONLY third-party dependency, attached to the App target
|
||||
# ONLY (plan §2) — packages must never import it.
|
||||
SwiftTerm:
|
||||
url: https://github.com/migueldeicaza/SwiftTerm
|
||||
from: 1.13.0
|
||||
|
||||
targets:
|
||||
WebTerm:
|
||||
type: application
|
||||
platform: iOS
|
||||
sources:
|
||||
- App/WebTerm
|
||||
dependencies:
|
||||
- package: WireProtocol
|
||||
- package: SessionCore
|
||||
- package: HostRegistry
|
||||
- package: APIClient
|
||||
- package: SwiftTerm
|
||||
settings:
|
||||
base:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: com.yaojia.webterm
|
||||
info:
|
||||
path: App/WebTerm/Resources/Info.plist
|
||||
properties:
|
||||
CFBundleDisplayName: WebTerm
|
||||
UILaunchScreen: {}
|
||||
UISupportedInterfaceOrientations:
|
||||
- UIInterfaceOrientationPortrait
|
||||
- UIInterfaceOrientationLandscapeLeft
|
||||
- UIInterfaceOrientationLandscapeRight
|
||||
# ── Security-critical keys, transcribed verbatim from PLAN_IOS_CLIENT §5.2 ──
|
||||
# NO NSAllowsArbitraryLoads anywhere (release OR debug): the five CIDR
|
||||
# exceptions below cover LAN + hotspot + Tailscale CGNAT + simulator
|
||||
# loopback, so no arbitrary-loads escape hatch is needed in P0.
|
||||
# T-iOS-19 re-verifies all five CIDR blocks in the release ipa.
|
||||
NSAppTransportSecurity:
|
||||
NSAllowsLocalNetworking: true # only covers .local / dotless hostnames, not bare IPs
|
||||
NSExceptionDomains: # bare IPs use CIDR exceptions (iOS 17+ semantics)
|
||||
"192.168.0.0/16":
|
||||
NSExceptionAllowsInsecureHTTPLoads: true
|
||||
"10.0.0.0/8":
|
||||
NSExceptionAllowsInsecureHTTPLoads: true
|
||||
"172.16.0.0/12": # RFC1918 third block (iPhone hotspot 172.20.10.x / corp LAN)
|
||||
NSExceptionAllowsInsecureHTTPLoads: true
|
||||
"100.64.0.0/10": # Tailscale CGNAT
|
||||
NSExceptionAllowsInsecureHTTPLoads: true
|
||||
"127.0.0.0/8": # simulator dev-loop (CIDR, not a single-IP key — DevForums 6205)
|
||||
NSExceptionAllowsInsecureHTTPLoads: true
|
||||
NSLocalNetworkUsageDescription: "连接你自己电脑上的 web-terminal 服务器"
|
||||
NSCameraUsageDescription: "扫描 web 终端的配对二维码"
|
||||
|
||||
schemes:
|
||||
WebTerm:
|
||||
build:
|
||||
targets:
|
||||
WebTerm: all
|
||||
run:
|
||||
config: Debug
|
||||
test:
|
||||
config: Debug
|
||||
Reference in New Issue
Block a user