Loading...
Loading...
Production-grade mobile app development and architecture for iOS (Swift/SwiftUI/UIKit), Android (Kotlin/Jetpack Compose), and cross-platform (React Native, Flutter, Kotlin Multiplatform, WebView). Use for navigation, state, networking, offline storage, auth/passkeys, push, performance, testing, CI/CD, and App Store/Play release readiness.
npx skill4agent add vasilyu1983/ai-agents-public software-mobile| 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 |
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 iterationChoosing 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 structureNeed 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-fsNeed 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@MainActorNote: Skip unless the app ships AI/automation features.
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 failureiOS (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| 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 |
CC-*| 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 |
data/sources.json"mobile development best practices 2026""[iOS/Android/React Native/Flutter] updates 2026""mobile framework comparison 2026""[Expo/Swift/Kotlin] new features 2026"