software-mobile

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Mobile 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

速查表

TaskiOSAndroidCross-PlatformWhen to Use
Native UISwiftUI + UIKitJetpack Compose + ViewsReact NativeNative: Best performance; Cross-platform: Code sharing
NavigationNavigationStackNavigation ComponentReact NavigationPlatform-specific for native feel
State Management@State/@ObservableViewModel + StateFlowRedux/MobXiOS: @Observable; Android: ViewModel; RN: Redux
NetworkingURLSession + async/awaitRetrofit + CoroutinesAxios/FetchNative: Type-safe; RN: JavaScript ecosystem
Local StorageCore Data + SwiftDataRoom DatabaseAsyncStorage/SQLiteNative: Full control; RN: Simpler
Push NotificationsAPNsFCMReact Native FirebaseNative: Platform-specific; RN: Unified API
Background TasksBGTaskSchedulerWorkManagerHeadless JSFor scheduled/background work
Deep LinkingUniversal LinksApp LinksReact Navigation linkingFor URL-based app entry
AuthenticationAuthenticationServicesCredential ManagerExpo AuthSessionFor social/biometric auth
AnalyticsFirebase/AmplitudeFirebase/AmplitudeExpo AnalyticsTrack user behavior

任务iOSAndroid跨平台适用场景
原生UISwiftUI + UIKitJetpack Compose + ViewsReact Native原生:最佳性能;跨平台:代码复用
导航NavigationStackNavigation ComponentReact Navigation原生风格选择平台特定方案
状态管理@State/@ObservableViewModel + StateFlowRedux/MobXiOS:@Observable;Android:ViewModel;RN:Redux
网络通信URLSession + async/awaitRetrofit + CoroutinesAxios/Fetch原生:类型安全;RN:JavaScript生态
本地存储Core Data + SwiftDataRoom DatabaseAsyncStorage/SQLite原生:完全控制;RN:简单易用
推送通知APNsFCMReact Native Firebase原生:平台专属;RN:统一API
后台任务BGTaskSchedulerWorkManagerHeadless JS用于调度/后台工作
深度链接Universal LinksApp LinksReact Navigation linking基于URL的应用入口
身份验证AuthenticationServicesCredential ManagerExpo AuthSession社交/生物识别验证
数据分析Firebase/AmplitudeFirebase/AmplitudeExpo 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 iteration
text
需要为以下目标用户群构建移动应用:[目标受众]
    ├─ 仅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 structure
text
选择架构模式?
    ├─ 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-fs
text
需要本地存储数据?
    ├─ 简单键值对?
    │   ├─ 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-fs

Decision 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 Client

text
需要调用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 Client

Core 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
    @MainActor
    ; enable strict concurrency checks as appropriate
  • 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(核心)

Android (Core)

Android(核心)

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.

注意:除非应用包含AI/自动化功能,否则跳过此部分。
  • iOS:Core ML / 设备端推理原语https://developer.apple.com/documentation/coreml
  • Android:Google ML Kithttps://developers.google.com/ml-kit
  • 验证:模型大小/电池影响、离线/在线行为、用户控制(取消/撤销)、隐私边界[推断]

Common Patterns

常见模式

App Startup Checklist

应用启动检查清单

  1. Initialize dependencies
    • Configure DI container (Hilt/Koin/Swinject)
    • Set up logging and crash reporting
    • Initialize analytics
  2. Check authentication state
    • Validate stored tokens
    • Refresh if needed
    • Route to login or main screen
  3. Configure app state
    • Load user preferences
    • Set up push notification handlers
    • Initialize deep link handling
  1. 初始化依赖
    • 配置DI容器(Hilt/Koin/Swinject)
    • 设置日志和崩溃报告
    • 初始化数据分析
  2. 检查验证状态
    • 验证存储的令牌
    • 必要时刷新令牌
    • 路由到登录或主屏幕
  3. 配置应用状态
    • 加载用户偏好设置
    • 设置推送通知处理器
    • 初始化深度链接处理

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 failure
text
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 states

text
iOS(APNs):
1. 启用推送通知能力
2. 请求用户权限
3. 注册远程通知
4. 处理设备令牌
5. 实现通知代理

Android(FCM):
1. 将Firebase添加到项目
2. 实现FirebaseMessagingService
3. 处理通知/数据消息
4. 管理通知渠道(Android 8+)
5. 处理后台/前台状态

Performance Optimization

性能优化

AreaiOSAndroidMetric
Launch timePre-warm, lazy loadingCold start optimization< 2s cold start
List scrollingLazyVStack, prefetchLazyColumn, paging60 FPS
Image loadingAsyncImage, cacheCoil/Glide, disk cache< 100ms visible
MemoryInstruments profilingLeakCanary, ProfilerNo memory leaks
BatteryBackground App Refresh limitsDoze mode complianceMinimal drain

领域iOSAndroid指标
启动时间预加载、懒加载冷启动优化冷启动<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 (
    CC-*
    ) for citation
  • ../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

  • Swiftassets/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
  • SwiftUIassets/swiftui/template-swiftui-advanced.md
  • Kotlin/Androidassets/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-PatternProblemSolution
Blocking main threadUI freezes, ANRsUse async/coroutines for all I/O
Massive view controllersHard to test/maintainExtract to MVVM/services
Hardcoded stringsNo localizationUse NSLocalizedString/strings.xml
Ignoring lifecycleMemory leaks, crashesRespect activity/view lifecycle
No offline handlingPoor UX without networkCache data, queue operations
Storing secrets in codeSecurity vulnerabilityUse Keychain/Keystore
Using
decode()
without fallback
Crashes on missing/malformed API dataUse
decodeIfPresent()
with defaults
Missing @Bindable for @ObservableNavigationStack bindings don't workAdd
@Bindable var vm = vm
in body

反模式问题解决方案
阻塞主线程UI冻结、ANR所有I/O操作使用异步/协程
巨型视图控制器难以测试/维护提取到MVVM/服务层
硬编码字符串无法本地化使用NSLocalizedString/strings.xml
忽略生命周期内存泄漏、崩溃遵循Activity/View生命周期
无离线处理无网络时体验差缓存数据、队列操作
代码中存储密钥安全漏洞使用Keychain/Keystore
无回退地使用
decode()
API数据缺失/格式错误时崩溃使用
decodeIfPresent()
并设置默认值
@Observable缺失@BindableNavigationStack绑定失效在body中添加
@Bindable var vm = vm

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
data/sources.json
, clearly flagging that the recommendation may be stale.
重要:当用户询问移动开发相关的推荐问题时,必须(如果可用)使用网络搜索功能检查当前趋势后再回答。如果无法使用网络搜索,请告知用户,并使用
data/sources.json
中的内容回答,同时明确标注推荐内容可能已过时。

Trigger 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

必要搜索

  1. Search:
    "mobile development best practices 2026"
  2. Search:
    "[iOS/Android/React Native/Flutter] updates 2026"
  3. Search:
    "mobile framework comparison 2026"
  4. Search:
    "[Expo/Swift/Kotlin] new features 2026"
  1. 搜索:
    "mobile development best practices 2026"
  2. 搜索:
    "[iOS/Android/React Native/Flutter] updates 2026"
  3. 搜索:
    "mobile framework comparison 2026"
  4. 搜索:
    "[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设计模式和无障碍 ",