Files
hyungi_document_server/Package.swift
T
hyungi 5206cf3b0c feat(s3): A-6 Xcode .app 타깃 (xcodegen) — 실행 가능한 macOS 앱
bare SPM 실행타깃은 .app 번들/Info.plist 없어 macOS 액세서리로 취급 → Cmd+R
윈도우 미표시. xcodegen project.yml 로 진짜 application 타깃 생성.

- @main 셸을 Sources/DSApp → App/DSApp.swift 이동 (SPM 간섭 제거, SPM 은
  라이브러리+테스트만 소유 → swift build/test 백엔드-free 유지).
- Package.swift: executableTarget DSApp 제거, AppFeature library product 추가
  (App 타깃이 로컬 SPM product 로 의존).
- project.yml: application 타깃 DSApp(.macOS 26, Swift6 mode), Info.plist(APPL,
  LSUIElement 없음=일반 윈도우 앱) + entitlements(app-sandbox·network.client·
  files.user-selected) → Support/ 생성, xcodeproj/Support 는 gitignore.

검증: swift build + swift test 72 green / xcodebuild BUILD SUCCEEDED (서명 off
스모크 + ad-hoc 서명 빌드 둘 다) / DS.app 실행 확인(pid 생존·sandbox 크래시 0).
사용자 경로: `xcodegen generate` → DSApp.xcodeproj 열기 → My Mac → Cmd+R.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 07:39:47 +09:00

58 lines
2.2 KiB
Swift

// swift-tools-version: 6.2
//
// DS multidevice app unified package (S2 AIFabric + S3 app), one repo / one manifest.
//
// AIFabric (Sources/AI, S2-owned) is compiled exactly once as a single target here, so the
// " b" duplicate-symbol concern (two packages each compiling Sources/AI) does not arise.
// It is also exposed as a library product so a future separate app package could depend on it.
//
// Ownership boundary unchanged: S2 owns Sources/AI/** + Tests/AITests/**; S3 owns DSKit / AppFeature
// / Tests/DSKitTests. S3 consumes AIFabric read-only.
//
// A-6 (Xcode .app target via xcodegen): the runnable macOS app shell lives in App/DSApp.swift, owned
// by the xcodegen "DSApp" application target (project.yml), NOT by SPM. SPM here builds only the
// libraries + tests, so `swift build` / `swift test` stay backend-free and the executable lives in
// the real .app bundle (Info.plist + entitlements) where Cmd+R actually opens a window. The App
// target depends on the AppFeature library product below.
import PackageDescription
let package = Package(
name: "DSApp",
platforms: [
.macOS(.v26), // FoundationModels (OnDeviceProvider) + 3-column NavigationSplitView
],
products: [
.library(name: "AIFabric", targets: ["AIFabric"]),
// Consumed by the xcodegen "DSApp" .app target (App/DSApp.swift).
.library(name: "AppFeature", targets: ["AppFeature"]),
],
targets: [
.target(
name: "AIFabric",
path: "Sources/AI",
swiftSettings: [.swiftLanguageMode(.v6)]
),
.target(
name: "DSKit",
resources: [.process("Resources")],
swiftSettings: [.swiftLanguageMode(.v6)]
),
.target(
name: "AppFeature",
dependencies: ["DSKit", "AIFabric"],
swiftSettings: [.swiftLanguageMode(.v6)]
),
.testTarget(
name: "DSKitTests",
dependencies: ["DSKit", "AIFabric"],
swiftSettings: [.swiftLanguageMode(.v6)]
),
.testTarget(
name: "AITests",
dependencies: ["AIFabric"],
path: "Tests/AITests",
swiftSettings: [.swiftLanguageMode(.v6)]
),
]
)