Loading...
Loading...
Compare original and translation side by side
├── App Architecture (SwiftUI, UIKit, AppKit, hybrid)
├── Data Layer (Core Data, SwiftData, Realm, custom)
├── Networking (URLSession, Alamofire, custom)
├── State Management (ObservableObject, TCA, Redux-like)
├── Navigation (NavigationStack, Coordinator)
├── Shared Frameworks (SPM packages, shared targets)
├── Assets (colors, images, SF Symbols)
├── Existing Watch Target (if any)
└── Minimum iOS Version (affects watchOS targeting)*.xcodeprojPackage.swiftInfo.plist├── 应用架构(SwiftUI, UIKit, AppKit, 混合架构)
├── 数据层(Core Data, SwiftData, Realm, 自定义)
├── 网络模块(URLSession, Alamofire, 自定义)
├── 状态管理(ObservableObject, TCA, 类Redux架构)
├── 导航(NavigationStack, Coordinator)
├── 共享框架(SPM包、共享Target)
├── 资源文件(颜色、图片、SF Symbols)
├── 现有Watch Target(若存在)
└── 最低iOS版本(影响watchOS目标版本)*.xcodeprojPackage.swiftInfo.plist[FrameworkName] watchOS availability site:developer.apple.com[FrameworkName] watchOS availability site:developer.apple.comreferences/api-compatibility.mdreferences/api-compatibility.mdiOS 16+ → watchOS 9+ (WidgetKit complications)
iOS 17+ → watchOS 10+ (SwiftData, Smart Stack)
iOS 18+ → watchOS 11+ (Live Activities on Watch)iOS 16+ → watchOS 9+ (WidgetKit复杂功能)
iOS 17+ → watchOS 10+(SwiftData、智能堆叠)
iOS 18+ → watchOS 11+(Watch端实时活动)Shared/
├── Models/ # Pure Swift, shared via target membership
├── Services/ # Platform-agnostic logic
└── Utilities/
WatchApp/
├── App.swift
├── Views/
├── ViewModels/
├── Complications/
└── WatchConnectivity/Shared/
├── Models/ # 纯Swift代码,通过Target成员共享
├── Services/ # 平台无关逻辑
└── Utilities/
WatchApp/
├── App.swift
├── Views/
├── ViewModels/
├── Complications/
└── WatchConnectivity/isLuminanceReducedisLuminanceReducedreferences/plan-template.mdreferences/plan-template.md"I've analyzed your project and created a watchOS plan. Before proceeding:
- API Warnings: [N] APIs unavailable—alternatives documented.
- Recommended Features: [list] prioritized for Watch.
- Scope: [N] phases.
Proceed with implementation, or adjust the plan?"
"我已分析您的项目并创建了watchOS实施计划。在开始前:
- API警告:有[N]个API不可用——已记录替代方案。
- 推荐功能:[列表]为Watch端优先开发功能。
- 范围:共[N]个阶段。
是否继续实施,或需要调整计划?"
guard WCSession.default.activationState == .activated else { return }
// sendMessage: immediate, requires reachability
// transferUserInfo: queued, guaranteed
// transferCurrentComplicationUserInfo: complication priorityguard WCSession.default.activationState == .activated else { return }
// sendMessage: 即时传输,要求设备在线
// transferUserInfo: 队列传输,保证送达
// transferCurrentComplicationUserInfo: 复杂功能优先传输// Use appropriate reload policy
Timeline(entries: entries, policy: .after(nextUpdateDate))
// Use .never for static complications// 使用合适的重载策略
Timeline(entries: entries, policy: .after(nextUpdateDate))
// 静态复杂功能使用.neverisLuminanceReducedisLuminanceReduced