为各模块和子目录添加 AGENTS.md,便于 AI 助手理解项目结构。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.5 KiB
1.5 KiB
iosApp
Purpose
iOS 应用入口,Xcode 项目结构。使用 SwiftUI 的 ComposeUIViewController 承载共享模块中的 Compose UI,共享模块通过 CocoaPods/SPM 集成为 framework。
Key Files
| File | Description |
|---|---|
iosApp.xcodeproj/project.pbxproj |
Xcode 项目配置 |
iosApp/iOSApp.swift |
iOS 应用入口(@main App) |
iosApp/ContentView.swift |
SwiftUI 视图,嵌入 ComposeUIViewController |
iosApp/Info.plist |
iOS 应用信息配置 |
Configuration/Config.xcconfig |
Xcode 构建设置 |
Subdirectories
| Directory | Purpose |
|---|---|
iosApp/ |
Swift 源码和资源(见 iosApp/iosApp/AGENTS.md) |
Configuration/ |
Xcode 构建设置文件 |
For AI Agents
Working In This Directory
- 不要在此目录添加业务逻辑;所有逻辑在
:shared模块 - 首次打开 Xcode 前需运行
./gradlew :shared:generateDummyFramework - 修改
shared后需重新生成 framework
Testing Requirements
- 打开
iosApp/iosApp.xcworkspace在 Xcode 中运行 - iOS 测试通过 Xcode 执行
Common Patterns
ContentView使用UIViewControllerRepresentable包装ComposeUIViewControllerMainViewController工厂在shared/src/iosMain/中定义
Dependencies
Internal
:shared模块 — 作为 iOS framework 集成
External
- SwiftUI, UIKit