software-mobile
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMobile Development Skill — Quick Reference
移动开发技能速查手册
This skill equips mobile developers with execution-ready patterns for building native and cross-platform mobile applications. Apply these patterns when you need iOS/Android app architecture, UI components, navigation flows, API integration, offline storage, authentication, or mobile-specific features.
本技能为移动开发者提供可直接落地的原生与跨平台移动应用开发模式。当你需要iOS/Android应用架构、UI组件、导航流程、API集成、离线存储、身份验证或移动专属功能方案时,可参考这些模式。
When to Use This Skill
适用场景
Use this skill when you need:
- iOS app development (Swift, SwiftUI, UIKit)
- Android app development (Kotlin, Jetpack Compose)
- Cross-platform development (React Native, WebView)
- Mobile app architecture and patterns
- Navigation and routing
- State management (Redux, MobX, MVVM)
- Network requests and API integration
- Local data storage (Core Data, Room, SQLite)
- Authentication and session management
- Push notifications (APNs, FCM)
- Camera and media access
- Location services
- App Store / Play Store deployment
- Mobile performance optimization
- Offline-first architecture
- Deep linking and universal links
在以下场景中使用本技能:
- iOS应用开发(Swift、SwiftUI、UIKit)
- Android应用开发(Kotlin、Jetpack Compose)
- 跨平台开发(React Native、WebView)
- 移动应用架构与模式设计
- 导航与路由实现
- 状态管理(Redux、MobX、MVVM)
- 网络请求与API集成
- 本地数据存储(Core Data、Room、SQLite)
- 身份验证与会话管理
- 推送通知(APNs、FCM)
- 相机与媒体访问
- 定位服务
- App Store / Play商店部署
- 移动性能优化
- 离线优先架构
- 深度链接与通用链接
Quick Reference Table
速查表
| Task | iOS | Android | Cross-Platform | When to Use |
|---|---|---|---|---|
| Native UI | SwiftUI + UIKit | Jetpack Compose + Views | React Native | Native: Best performance; Cross-platform: Code sharing |
| Navigation | NavigationStack | Navigation Component | React Navigation | Platform-specific for native feel |
| State Management | @State/@Observable | ViewModel + StateFlow | Redux/MobX | iOS: @Observable; Android: ViewModel; RN: Redux |
| Networking | URLSession + async/await | Retrofit + Coroutines | Axios/Fetch | Native: Type-safe; RN: JavaScript ecosystem |
| Local Storage | Core Data + SwiftData | Room Database | AsyncStorage/SQLite | Native: Full control; RN: Simpler |
| Push Notifications | APNs | FCM | React Native Firebase | Native: Platform-specific; RN: Unified API |
| Background Tasks | BGTaskScheduler | WorkManager | Headless JS | For scheduled/background work |
| Deep Linking | Universal Links | App Links | React Navigation linking | For URL-based app entry |
| Authentication | AuthenticationServices | Credential Manager | Expo AuthSession | For social/biometric auth |
| Analytics | Firebase/Amplitude | Firebase/Amplitude | Expo Analytics | Track user behavior |
| 任务 | iOS | Android | 跨平台 | 适用场景 |
|---|---|---|---|---|
| 原生UI | SwiftUI + UIKit | Jetpack Compose + Views | React Native | 原生:最佳性能;跨平台:代码复用 |
| 导航 | NavigationStack | Navigation Component | React Navigation | 原生风格选择平台特定方案 |
| 状态管理 | @State/@Observable | ViewModel + StateFlow | Redux/MobX | iOS:@Observable;Android:ViewModel;RN:Redux |
| 网络通信 | URLSession + async/await | Retrofit + Coroutines | Axios/Fetch | 原生:类型安全;RN:JavaScript生态 |
| 本地存储 | Core Data + SwiftData | Room Database | AsyncStorage/SQLite | 原生:完全控制;RN:简单易用 |
| 推送通知 | APNs | FCM | React Native Firebase | 原生:平台专属;RN:统一API |
| 后台任务 | BGTaskScheduler | WorkManager | Headless JS | 用于调度/后台工作 |
| 深度链接 | Universal Links | App Links | React Navigation linking | 基于URL的应用入口 |
| 身份验证 | AuthenticationServices | Credential Manager | Expo AuthSession | 社交/生物识别验证 |
| 数据分析 | Firebase/Amplitude | Firebase/Amplitude | Expo Analytics | 追踪用户行为 |
Decision Tree: Platform Selection
平台选择决策树
text
Need to build mobile app for: [Target Audience]
│
├─ iOS only?
│ ├─ New app? → SwiftUI (modern, declarative)
│ ├─ Existing UIKit codebase? → UIKit + incremental SwiftUI adoption
│ └─ Complex animations? → UIKit for fine-grained control
│
├─ Android only?
│ ├─ New app? → Jetpack Compose (modern, declarative)
│ ├─ Existing Views codebase? → Views + incremental Compose adoption
│ └─ Complex custom views? → Custom View for fine-grained control
│
├─ Both iOS and Android?
│ ├─ Need maximum performance / platform fidelity?
│ │ └─ Build separate native apps (Swift + Kotlin)
│ │
│ ├─ Need faster development + code sharing?
│ │ ├─ JavaScript/TypeScript team? → React Native (Expo-managed or bare)
│ │ ├─ Dart team? → Flutter
│ │ └─ Kotlin team? → Kotlin Multiplatform (KMP)
│ │
│ ├─ Kotlin Multiplatform (KMP)?
│ │ ├─ Share business logic only? → KMP shared module + native UI
│ │ ├─ Share some UI? → Compose Multiplatform (validate iOS maturity for your needs)
│ │ └─ Shared modules need platform UI? → Keep native UI, share domain/data/networking
│ │
│ └─ Wrapping existing web app?
│ ├─ Simple wrapper? → WebView (iOS WKWebView / Android WebView)
│ └─ Native features needed? → Capacitor or React Native WebView
│
└─ Prototype/MVP only?
└─ React Native or Flutter for fastest iterationtext
需要为以下目标用户群构建移动应用:[目标受众]
│
├─ 仅iOS?
│ ├─ 新应用? → SwiftUI(现代声明式框架)
│ ├─ 已有UIKit代码库? → UIKit + 逐步引入SwiftUI
│ └─ 复杂动画? → UIKit(精细控制)
│
├─ 仅Android?
│ ├─ 新应用? → Jetpack Compose(现代声明式框架)
│ ├─ 已有Views代码库? → Views + 逐步引入Compose
│ └─ 复杂自定义视图? → Custom View(精细控制)
│
├─ 同时支持iOS和Android?
│ ├─ 需要极致性能/平台原生体验?
│ │ └─ 分别开发原生应用(Swift + Kotlin)
│ │
│ ├─ 需要快速开发+代码复用?
│ │ ├─ 团队熟悉JavaScript/TypeScript? → React Native(Expo托管或裸工程)
│ │ ├─ 团队熟悉Dart? → Flutter
│ │ └─ 团队熟悉Kotlin? → Kotlin Multiplatform(KMP)
│ │
│ ├─ Kotlin Multiplatform(KMP)?
│ │ ├─ 仅共享业务逻辑? → KMP共享模块 + 原生UI
│ │ ├─ 共享部分UI? → Compose Multiplatform(根据需求验证iOS端成熟度)
│ │ └─ 共享模块需要平台UI? → 保留原生UI,共享领域/数据/网络层
│ │
│ └─ 包装现有Web应用?
│ ├─ 简单包装? → WebView(iOS WKWebView / Android WebView)
│ └─ 需要原生功能? → Capacitor或React Native WebView
│
└─ 仅原型/MVP?
└─ React Native或Flutter(最快迭代速度)Decision Tree: Architecture Pattern
架构模式决策树
text
Choosing architecture pattern?
│
├─ iOS (Swift)?
│ ├─ SwiftUI app? → MVVM with @Observable/ObservableObject (based on OS baseline)
│ ├─ Complex SwiftUI? → TCA (Composable Architecture) for testability
│ ├─ UIKit app? → MVVM-C (Coordinator pattern)
│ ├─ Large team? → Clean Architecture + MVVM
│ └─ Simple app? → MVC (Apple default)
│
├─ Android (Kotlin)?
│ ├─ Compose app? → MVVM with ViewModel + StateFlow
│ ├─ Views app? → MVVM with LiveData
│ ├─ Large team? → Clean Architecture + MVVM
│ └─ Simple app? → Activity/Fragment-based
│
└─ React Native?
├─ Small app? → Context API + useState
├─ Medium app? → Redux Toolkit or Zustand
└─ Large app? → Redux + RTK Query + feature-based structuretext
选择架构模式?
│
├─ iOS(Swift)?
│ ├─ SwiftUI应用? → MVVM + @Observable/ObservableObject(基于系统基线)
│ ├─ 复杂SwiftUI应用? → TCA(Composable Architecture,可测试性优先)
│ ├─ UIKit应用? → MVVM-C(Coordinator模式)
│ ├─ 大型团队? → 整洁架构 + MVVM
│ └─ 简单应用? → MVC(Apple默认)
│
├─ Android(Kotlin)?
│ ├─ Compose应用? → MVVM + ViewModel + StateFlow
│ ├─ Views应用? → MVVM + LiveData
│ ├─ 大型团队? → 整洁架构 + MVVM
│ └─ 简单应用? → Activity/Fragment架构
│
└─ React Native?
├─ 小型应用? → Context API + useState
├─ 中型应用? → Redux Toolkit或Zustand
└─ 大型应用? → Redux + RTK Query + 基于功能的结构Decision Tree: Data Persistence
数据持久化决策树
text
Need to store data locally?
│
├─ Simple key-value pairs?
│ ├─ iOS → UserDefaults
│ ├─ Android → SharedPreferences / DataStore
│ └─ RN → AsyncStorage
│
├─ Structured data with relationships?
│ ├─ iOS → Core Data or SwiftData
│ ├─ Android → Room Database
│ └─ RN → WatermelonDB or Realm
│
├─ Secure credentials?
│ ├─ iOS → Keychain
│ ├─ Android → EncryptedSharedPreferences / Keystore
│ └─ RN → react-native-keychain
│
└─ Large files/media?
├─ iOS → FileManager (Documents/Cache)
├─ Android → Internal/External Storage
└─ RN → react-native-fstext
需要本地存储数据?
│
├─ 简单键值对?
│ ├─ iOS → UserDefaults
│ ├─ Android → SharedPreferences / DataStore
│ └─ RN → AsyncStorage
│
├─ 带关系的结构化数据?
│ ├─ iOS → Core Data或SwiftData
│ ├─ Android → Room Database
│ └─ RN → WatermelonDB或Realm
│
├─ 安全凭据?
│ ├─ iOS → Keychain
│ ├─ Android → EncryptedSharedPreferences / Keystore
│ └─ RN → react-native-keychain
│
└─ 大文件/媒体?
├─ iOS → FileManager(Documents/Cache)
├─ Android → 内部/外部存储
└─ RN → react-native-fsDecision Tree: Networking
网络通信决策树
text
Need to make API calls?
│
├─ iOS?
│ ├─ Simple REST? → URLSession + async/await
│ ├─ Complex API? → URLSession + Codable
│ └─ GraphQL? → Apollo iOS
│
├─ Android?
│ ├─ Simple REST? → Retrofit + Coroutines
│ ├─ Complex API? → Retrofit + OkHttp interceptors
│ └─ GraphQL? → Apollo Android
│
└─ React Native?
├─ Simple REST? → fetch() or Axios
├─ Complex API? → RTK Query or React Query
└─ GraphQL? → Apollo Clienttext
需要调用API?
│
├─ iOS?
│ ├─ 简单REST? → URLSession + async/await
│ ├─ 复杂API? → URLSession + Codable
│ └─ GraphQL? → Apollo iOS
│
├─ Android?
│ ├─ 简单REST? → Retrofit + Coroutines
│ ├─ 复杂API? → Retrofit + OkHttp拦截器
│ └─ GraphQL? → Apollo Android
│
└─ React Native?
├─ 简单REST? → fetch()或Axios
├─ 复杂API? → RTK Query或React Query
└─ GraphQL? → Apollo ClientCore Capabilities
核心能力
iOS Development
iOS开发
- UI Frameworks: SwiftUI (declarative), UIKit (imperative)
- Architecture: MVVM, Clean Architecture, Coordinator, TCA (Composable Architecture)
- Concurrency: Swift Concurrency (async/await, actors, TaskGroup); keep UI state on ; enable strict concurrency checks as appropriate
@MainActor - Storage: Core Data, SwiftData, Keychain
- Networking: URLSession, async/await patterns
- Platform compliance: Privacy manifests + required-reason APIs, background execution limits, and accessibility settings (Dynamic Type, VoiceOver)
- Defensive Decoding: Handle missing fields, array/dict formats, snake_case/camelCase
- UI框架:SwiftUI(声明式)、UIKit(命令式)
- 架构:MVVM、整洁架构、Coordinator、TCA(Composable Architecture)
- 并发:Swift Concurrency(async/await、actors、TaskGroup);UI状态需在中处理;按需启用严格并发检查
@MainActor - 存储:Core Data、SwiftData、Keychain
- 网络:URLSession、async/await模式
- 平台合规:隐私清单+必要原因API、后台执行限制、无障碍设置(动态类型、VoiceOver)
- 防御性解码:处理缺失字段、数组/字典格式、snake_case/camelCase转换
Android Development
Android开发
- UI Frameworks: Jetpack Compose (declarative), Views (XML)
- Architecture: MVVM, Clean Architecture, MVI
- Concurrency: Coroutines, Flow, LiveData
- Storage: Room, DataStore, Keystore
- Networking: Retrofit, OkHttp, Ktor
- UI框架:Jetpack Compose(声明式)、Views(XML)
- 架构:MVVM、整洁架构、MVI
- 并发:Coroutines、Flow、LiveData
- 存储:Room、DataStore、Keystore
- 网络:Retrofit、OkHttp、Ktor
Cross-Platform Development
跨平台开发
- Kotlin Multiplatform (KMP): Share domain/data/networking; keep native UI; consider Compose Multiplatform when shared UI is worth the constraints
- React Native: JavaScript/TypeScript; evaluate New Architecture readiness and native-module surface area; Expo-managed path is often fastest for greenfield apps
- Flutter: Dart; high code sharing; validate platform-specific gaps and plugin maturity for your requirements
- WebView: WKWebView (iOS), WebView (Android), JavaScript bridge
- Kotlin Multiplatform(KMP):共享领域/数据/网络层;保留原生UI;当共享UI的收益大于约束时,可考虑Compose Multiplatform
- React Native:JavaScript/TypeScript;评估新架构就绪度和原生模块覆盖范围;Expo托管路径通常是新项目的最快选择
- Flutter:Dart;高代码复用率;根据需求验证平台特定缺口和插件成熟度
- WebView:WKWebView(iOS)、WebView(Android)、JavaScript桥接
Platform Baselines (Verify Current Requirements)
平台基线(验证当前要求)
iOS/iPadOS (Core)
iOS/iPadOS(核心)
- Privacy manifest files (app + embedded SDKs) are maintained and reviewed https://developer.apple.com/documentation/bundlereferences/privacy_manifest_files
- Required-reason APIs are declared with valid reasons https://developer.apple.com/documentation/bundlereferences/privacy_manifest_files
- Background work uses supported primitives (avoid fragile timers) https://developer.apple.com/documentation/backgroundtasks
- App Transport Security is configured; exceptions are justified and documented https://developer.apple.com/documentation/bundlereferences/information_property_list/nsapptransportsecurity
- Concurrency is implemented with Swift Concurrency (async/await, actors, TaskGroup) and checked with current Swift language mode settings https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html
- Swift 6 migration / strict concurrency guidance is followed when upgrading toolchains https://developer.apple.com/documentation/swift/adoptingswift6
- UI/UX follows current Human Interface Guidelines (including accessibility) https://developer.apple.com/design/human-interface-guidelines/ios
- 维护并审查隐私清单文件(应用+嵌入SDK)https://developer.apple.com/documentation/bundlereferences/privacy_manifest_files
- 声明必要原因API并提供合理理由https://developer.apple.com/documentation/bundlereferences/privacy_manifest_files
- 使用支持的原语处理后台工作(避免不可靠的计时器)https://developer.apple.com/documentation/backgroundtasks
- 配置App Transport Security;例外情况需说明理由并记录https://developer.apple.com/documentation/bundlereferences/information_property_list/nsapptransportsecurity
- 使用Swift Concurrency(async/await、actors、TaskGroup)实现并发,并根据当前Swift语言模式设置进行检查https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html
- 升级工具链时遵循Swift 6迁移/严格并发指南https://developer.apple.com/documentation/swift/adoptingswift6
- UI/UX遵循当前人机界面指南(包括无障碍)https://developer.apple.com/design/human-interface-guidelines/ios
Android (Core)
Android(核心)
- Background work uses WorkManager for deferrable, guaranteed work https://developer.android.com/topic/libraries/architecture/workmanager
- Network calls and auth state survive process death (no hidden singleton assumptions) [Inference]
- Target SDK meets current Google Play requirements (verify policy + deadlines) https://support.google.com/googleplay/android-developer/answer/11926878
- Prefer Play Integrity API over deprecated SafetyNet Attestation https://developer.android.com/google/play/integrity
- Prefer Credential Manager for passkeys and modern sign-in flows https://developer.android.com/identity/sign-in/credential-manager
- 后台工作使用WorkManager处理可延迟、需保证执行的任务https://developer.android.com/topic/libraries/architecture/workmanager
- 网络请求和验证状态可在进程终止后恢复(避免隐藏单例假设)[推断]
- 目标SDK版本符合当前Google Play要求(验证政策+截止日期)https://support.google.com/googleplay/android-developer/answer/11926878
- 优先使用Play Integrity API而非已弃用的SafetyNet Attestationhttps://developer.android.com/google/play/integrity
- 优先使用Credential Manager处理通行密钥和现代登录流程https://developer.android.com/identity/sign-in/credential-manager
Cross-Platform (Core)
跨平台(核心)
- Feature parity is explicit (document what is native-only vs shared) [Inference]
- Bridges are treated as public APIs (versioned, tested, and observable) [Inference]
- React Native upgrades follow the official upgrade guide; validate New Architecture readiness against your native-module surface area https://reactnative.dev/docs/upgrading
- Expo SDK upgrades follow Expo release notes and upgrade guides https://expo.dev/changelog
- 明确功能 parity(记录原生专属与共享功能)[推断]
- 将桥接视为公共API(版本化、测试、可观察)[推断]
- 遵循官方升级指南升级React Native;根据原生模块覆盖范围验证新架构就绪度https://reactnative.dev/docs/upgrading
- 遵循Expo发布说明和升级指南升级Expo SDKhttps://expo.dev/changelog
Optional: AI/Automation Extensions
可选:AI/自动化扩展
Note: Skip unless the app ships AI/automation features.
- iOS: Core ML / on-device inference primitives https://developer.apple.com/documentation/coreml
- Android: Google ML Kit https://developers.google.com/ml-kit
- Verify: model size/battery impact, offline/online behavior, user controls (cancel/undo), and privacy boundaries [Inference]
注意:除非应用包含AI/自动化功能,否则跳过此部分。
- iOS:Core ML / 设备端推理原语https://developer.apple.com/documentation/coreml
- Android:Google ML Kithttps://developers.google.com/ml-kit
- 验证:模型大小/电池影响、离线/在线行为、用户控制(取消/撤销)、隐私边界[推断]
Common Patterns
常见模式
App Startup Checklist
应用启动检查清单
-
Initialize dependencies
- Configure DI container (Hilt/Koin/Swinject)
- Set up logging and crash reporting
- Initialize analytics
-
Check authentication state
- Validate stored tokens
- Refresh if needed
- Route to login or main screen
-
Configure app state
- Load user preferences
- Set up push notification handlers
- Initialize deep link handling
-
初始化依赖
- 配置DI容器(Hilt/Koin/Swinject)
- 设置日志和崩溃报告
- 初始化数据分析
-
检查验证状态
- 验证存储的令牌
- 必要时刷新令牌
- 路由到登录或主屏幕
-
配置应用状态
- 加载用户偏好设置
- 设置推送通知处理器
- 初始化深度链接处理
Offline-First Architecture
离线优先架构
text
1. Local-first data access
- Always read from local database
- Display cached data immediately
- Show loading indicator for sync
2. Background sync
- Queue write operations
- Sync when connectivity available
- Handle conflict resolution
3. Optimistic updates
- Update UI immediately
- Sync in background
- Rollback on failuretext
1. 本地优先数据访问
- 始终从本地数据库读取
- 立即显示缓存数据
- 同步时显示加载指示器
2. 后台同步
- 队列写操作
- 联网时同步
- 处理冲突解决
3. 乐观更新
- 立即更新UI
- 后台同步
- 失败时回滚Push Notification Setup
推送通知设置
text
iOS (APNs):
1. Enable Push Notifications capability
2. Request user permission
3. Register for remote notifications
4. Handle device token
5. Implement notification delegate
Android (FCM):
1. Add Firebase to project
2. Implement FirebaseMessagingService
3. Handle notification/data messages
4. Manage notification channels (Android 8+)
5. Handle background/foreground statestext
iOS(APNs):
1. 启用推送通知能力
2. 请求用户权限
3. 注册远程通知
4. 处理设备令牌
5. 实现通知代理
Android(FCM):
1. 将Firebase添加到项目
2. 实现FirebaseMessagingService
3. 处理通知/数据消息
4. 管理通知渠道(Android 8+)
5. 处理后台/前台状态Performance Optimization
性能优化
| Area | iOS | Android | Metric |
|---|---|---|---|
| Launch time | Pre-warm, lazy loading | Cold start optimization | < 2s cold start |
| List scrolling | LazyVStack, prefetch | LazyColumn, paging | 60 FPS |
| Image loading | AsyncImage, cache | Coil/Glide, disk cache | < 100ms visible |
| Memory | Instruments profiling | LeakCanary, Profiler | No memory leaks |
| Battery | Background App Refresh limits | Doze mode compliance | Minimal drain |
| 领域 | iOS | Android | 指标 |
|---|---|---|---|
| 启动时间 | 预加载、懒加载 | 冷启动优化 | 冷启动<2秒 |
| 列表滚动 | LazyVStack、预取 | LazyColumn、分页 | 60 FPS |
| 图片加载 | AsyncImage、缓存 | Coil/Glide、磁盘缓存 | 可见区域加载<100ms |
| 内存 | Instruments分析 | LeakCanary、Profiler | 无内存泄漏 |
| 电池 | 限制后台应用刷新 | 适配Doze模式 | 最小化耗电 |
App Store Deployment Checklist
App商店部署检查清单
iOS App Store
iOS App Store
- App icons (all required sizes)
- Launch screen configured
- Privacy manifest per target and embedded frameworks (iOS 18+)
- Required-reason APIs declared with justifications
- Third-party SDK privacy manifests attached; SDK signature attestation (iOS 19+)
- Info.plist permissions explanations
- App Store screenshots (all device sizes)
- App Store description and keywords
- Privacy policy URL
- TestFlight beta testing
- 应用图标(所有所需尺寸)
- 配置启动屏幕
- 每个目标和嵌入框架的隐私清单(iOS 18+)
- 声明必要原因API并提供理由
- 附加第三方SDK隐私清单;SDK签名验证(iOS 19+)
- Info.plist权限说明
- App Store截图(所有设备尺寸)
- App Store描述和关键词
- 隐私政策URL
- TestFlight beta测试
Google Play Store
Google Play Store
- App icons and feature graphic
- Store listing screenshots
- Privacy policy URL
- Content rating questionnaire
- Target API level compliance
- Data safety form
- Internal/closed/open testing tracks
- 应用图标和功能图
- 商店列表截图
- 隐私政策URL
- 内容评级问卷
- 目标API级别合规
- 数据安全表单
- 内部/封闭/公开测试渠道
Navigation
导航
Resources
资源
- references/ios-best-practices.md — iOS architecture, concurrency, testing, performance, defensive decoding, and accessibility
- references/android-best-practices.md — Android/Kotlin architecture, coroutines, Compose, testing, performance
- references/operational-playbook.md — Mobile architecture patterns, platform-specific guides, security notes, and decision tables
- README.md — Folder overview and usage notes
- data/sources.json — Curated external references by platform
- references/ios-best-practices.md — iOS架构、并发、测试、性能、防御性解码和无障碍
- references/android-best-practices.md — Android/Kotlin架构、协程、Compose、测试、性能
- references/operational-playbook.md — 移动架构模式、平台特定指南、安全说明和决策表
- README.md — 文件夹概述和使用说明
- data/sources.json — 按平台分类的精选外部参考
Shared Checklists
共享检查清单
- ../software-clean-code-standard/assets/checklists/mobile-release-checklist.md — Product-agnostic mobile release readiness checklist (core + optional AI)
- ../software-clean-code-standard/assets/checklists/mobile-release-checklist.md — 产品无关的移动应用发布准备检查清单(核心+可选AI)
Shared Utilities (Centralized patterns — extract, don't duplicate)
共享工具(集中式模式 — 提取而非重复)
- ../software-clean-code-standard/utilities/auth-utilities.md — Argon2id, jose JWT, OAuth 2.1/PKCE (backend auth for mobile clients)
- ../software-clean-code-standard/utilities/error-handling.md — Error patterns, Result types
- ../software-clean-code-standard/utilities/resilience-utilities.md — Retry, circuit breaker for network calls
- ../software-clean-code-standard/utilities/logging-utilities.md — Structured logging patterns
- ../software-clean-code-standard/utilities/testing-utilities.md — Test factories, fixtures, mocks
- ../software-clean-code-standard/references/clean-code-standard.md — Canonical clean code rules () for citation
CC-*
- ../software-clean-code-standard/utilities/auth-utilities.md — Argon2id、jose JWT、OAuth 2.1/PKCE(移动客户端后端验证)
- ../software-clean-code-standard/utilities/error-handling.md — 错误模式、Result类型
- ../software-clean-code-standard/utilities/resilience-utilities.md — 网络请求重试、断路器
- ../software-clean-code-standard/utilities/logging-utilities.md — 结构化日志模式
- ../software-clean-code-standard/utilities/testing-utilities.md — 测试工厂、测试数据、模拟对象
- ../software-clean-code-standard/references/clean-code-standard.md — 规范整洁代码规则()用于引用
CC-*
Templates
模板
- Swift: assets/swift/template-swift.md, assets/swift/template-swift-concurrency.md, assets/swift/template-swift-combine.md, assets/swift/template-swift-performance.md, assets/swift/template-swift-testing.md
- SwiftUI: assets/swiftui/template-swiftui-advanced.md
- Kotlin/Android: assets/kotlin/template-kotlin.md, assets/kotlin/template-kotlin-coroutines.md, assets/kotlin/template-kotlin-compose-advanced.md, assets/kotlin/template-kotlin-testing.md
- Cross-platform: assets/cross-platform/template-platform-patterns.md, assets/cross-platform/template-webview.md
- Swift:assets/swift/template-swift.md, assets/swift/template-swift-concurrency.md, assets/swift/template-swift-combine.md, assets/swift/template-swift-performance.md, assets/swift/template-swift-testing.md
- SwiftUI:assets/swiftui/template-swiftui-advanced.md
- Kotlin/Android:assets/kotlin/template-kotlin.md, assets/kotlin/template-kotlin-coroutines.md, assets/kotlin/template-kotlin-compose-advanced.md, assets/kotlin/template-kotlin-testing.md
- 跨平台:assets/cross-platform/template-platform-patterns.md, assets/cross-platform/template-webview.md
Anti-Patterns to Avoid
需避免的反模式
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Blocking main thread | UI freezes, ANRs | Use async/coroutines for all I/O |
| Massive view controllers | Hard to test/maintain | Extract to MVVM/services |
| Hardcoded strings | No localization | Use NSLocalizedString/strings.xml |
| Ignoring lifecycle | Memory leaks, crashes | Respect activity/view lifecycle |
| No offline handling | Poor UX without network | Cache data, queue operations |
| Storing secrets in code | Security vulnerability | Use Keychain/Keystore |
Using | Crashes on missing/malformed API data | Use |
| Missing @Bindable for @Observable | NavigationStack bindings don't work | Add |
| 反模式 | 问题 | 解决方案 |
|---|---|---|
| 阻塞主线程 | UI冻结、ANR | 所有I/O操作使用异步/协程 |
| 巨型视图控制器 | 难以测试/维护 | 提取到MVVM/服务层 |
| 硬编码字符串 | 无法本地化 | 使用NSLocalizedString/strings.xml |
| 忽略生命周期 | 内存泄漏、崩溃 | 遵循Activity/View生命周期 |
| 无离线处理 | 无网络时体验差 | 缓存数据、队列操作 |
| 代码中存储密钥 | 安全漏洞 | 使用Keychain/Keystore |
无回退地使用 | API数据缺失/格式错误时崩溃 | 使用 |
| @Observable缺失@Bindable | NavigationStack绑定失效 | 在body中添加 |
Trend Awareness Protocol
趋势感知协议
IMPORTANT: When users ask recommendation questions about mobile development, you MUST use a web search capability (if available) to check current trends before answering. If web search is unavailable, say so and answer using , clearly flagging that the recommendation may be stale.
data/sources.json重要:当用户询问移动开发相关的推荐问题时,必须(如果可用)使用网络搜索功能检查当前趋势后再回答。如果无法使用网络搜索,请告知用户,并使用中的内容回答,同时明确标注推荐内容可能已过时。
data/sources.jsonTrigger Conditions
触发条件
- "What's the best mobile framework for [use case]?"
- "What should I use for [cross-platform/native/hybrid]?"
- "What's the latest in iOS/Android development?"
- "Current best practices for [Swift/Kotlin/React Native]?"
- "Is [React Native/Flutter/Expo] still relevant in 2026?"
- "[React Native] vs [Flutter] vs [native]?"
- "Best approach for [offline/push/deep linking]?"
- “[场景]的最佳移动框架是什么?”
- “[跨平台/原生/混合]开发应该用什么?”
- “iOS/Android开发的最新趋势是什么?”
- “[Swift/Kotlin/React Native]的当前最佳实践是什么?”
- “2026年React Native/Flutter/Expo还适用吗?”
- “React Native vs Flutter vs 原生?”
- “[离线/推送/深度链接]的最佳实现方式是什么?”
Required Searches
必要搜索
- Search:
"mobile development best practices 2026" - Search:
"[iOS/Android/React Native/Flutter] updates 2026" - Search:
"mobile framework comparison 2026" - Search:
"[Expo/Swift/Kotlin] new features 2026"
- 搜索:
"mobile development best practices 2026" - 搜索:
"[iOS/Android/React Native/Flutter] updates 2026" - 搜索:
"mobile framework comparison 2026" - 搜索:
"[Expo/Swift/Kotlin] new features 2026"
What to Report
需报告内容
After searching, provide:
- Current landscape: What frameworks/approaches are popular NOW
- Emerging trends: New patterns or tools gaining traction
- Deprecated/declining: Approaches that are losing relevance
- Recommendation: Based on fresh data and recent releases
搜索后提供:
- 当前格局:当前流行的框架/方案
- 新兴趋势:正在兴起的新模式或工具
- 已弃用/衰退:逐渐过时的方案
- 推荐:基于最新数据和近期版本的建议
Example Topics (verify with fresh search)
示例主题(需通过最新搜索验证)
- Current iOS + Swift Concurrency migration guidance
- Current Play target SDK policy and identity/auth guidance
- React Native New Architecture maturity and upgrade pain points
- Expo-managed vs bare React Native tradeoffs
- Flutter vs React Native vs KMP ecosystem in 2026
- Compose Multiplatform readiness for iOS in 2026
- 当前iOS + Swift Concurrency迁移指南
- 当前Play目标SDK政策和身份验证指南
- React Native新架构成熟度和升级痛点
- Expo托管与裸React Native的权衡
- 2026年Flutter vs React Native vs KMP生态
- 2026年Compose Multiplatform iOS端就绪度
Related Skills
相关技能
- ../software-frontend/SKILL.md — Web-facing UI patterns and Next.js integration
- ../software-backend/SKILL.md — API design, auth, and backend contracts for mobile clients
- ../qa-testing-strategy/SKILL.md — Mobile CI, test strategy, and reliability gates
- ../qa-resilience/SKILL.md — Resilience patterns for networked mobile apps
- ../qa-testing-ios/SKILL.md — iOS-focused test planning, XCTest/Swift Testing patterns, device matrix, and app health checks
- ../software-ui-ux-design/SKILL.md — Mobile UI/UX design patterns and accessibility
- ../software-frontend/SKILL.md — Web端UI模式和Next.js集成
- ../software-backend/SKILL.md — 面向移动客户端的API设计、验证和后端契约
- ../qa-testing-strategy/SKILL.md — 移动CI、测试策略和可靠性关卡
- ../qa-resilience/SKILL.md — 网络移动应用的弹性模式
- ../qa-testing-ios/SKILL.md — iOS专属测试规划、XCTest/Swift Testing模式、设备矩阵和应用健康检查
- ../software-ui-ux-design/SKILL.md — 移动UI/UX设计模式和无障碍 ",