6133eb6926
- 맥·iOS 2타깃, WKWebView 로 웹 UI 100% 재사용(2026-06-15 결정: 맥/아이폰=웹 래퍼) - 영속 쿠키(로그인 유지), 첨부 응답 다운로드 처리, 업로드는 네이티브 피커 자동 - 맥 창 off-screen 가드(분리 모니터 좌표 저장 시 중앙 복귀) - DS 초록 라운드 아이콘(맥=라운드/iOS=풀블리드, 1024px 생성) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
30 lines
796 B
Swift
30 lines
796 B
Swift
import SwiftUI
|
|
|
|
/// DS 웹 래퍼 — document.hyungi.net 을 네이티브 창에 로드. 로그인은 WKWebsiteDataStore.default()
|
|
/// 영속 쿠키로 유지(브라우저처럼). 맥·iOS 공용 @main.
|
|
@main
|
|
struct DSShellApp: App {
|
|
private let url = URL(string: "https://document.hyungi.net")!
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
RootWeb(url: url)
|
|
}
|
|
#if os(macOS)
|
|
.windowStyle(.automatic)
|
|
#endif
|
|
}
|
|
}
|
|
|
|
struct RootWeb: View {
|
|
let url: URL
|
|
var body: some View {
|
|
WebView(url: url)
|
|
.ignoresSafeArea()
|
|
#if os(macOS)
|
|
.frame(minWidth: 900, minHeight: 600)
|
|
.background(WindowOnScreenGuard()) // 분리된 모니터 좌표 저장 시 화면 밖 방지
|
|
#endif
|
|
}
|
|
}
|