iOS Tech Stack Options Guide
Comprehensive guide to technology choices for iOS app development, helping you select the right tools and frameworks.
UI Framework Selection
SwiftUI vs UIKit
| Aspect | SwiftUI | UIKit |
|---|---|---|
| Minimum iOS | iOS 13+ (iOS 15+ recommended) | iOS 2+ |
| Learning Curve | Medium (declarative paradigm) | Medium-High (imperative) |
| Maturity | Young (2019+) | Mature (2008+) |
| Performance | Excellent (optimized) | Excellent |
| Customization | Good (improving) | Excellent |
| Community | Growing | Extensive |
| Future | Apple's focus | Maintained |
When to Use SwiftUI
✅ Use SwiftUI when:
- Targeting iOS 15+ (or iOS 14+ minimum)
- Starting a new project
- Want rapid UI development
- Prefer declarative syntax
- Building for multiple Apple platforms
- Standard UI components sufficient
Strengths:
- Declarative, intuitive syntax
- Live previews speed development
- Built-in dark mode support
- Excellent multi-platform support
- Less code for common UIs
- Native animations
Limitations:
- Some advanced UIKit features not available
- Harder to integrate with legacy code
- iOS version requirements
- Still evolving (breaking changes possible)
When to Use UIKit
✅ Use UIKit when:
- Need to support iOS 12 or earlier
- Require advanced customization
- Have existing UIKit codebase
- Need specific UIKit-only features
- Team more experienced with UIKit
Strengths:
- Mature, stable API
- Extensive customization options
- Larger community/resources
- Support for older iOS versions
- More third-party library support
- Fine-grained control
Limitations:
- More verbose code
- Manual dark mode implementation
- Imperative (more complex)
- Storyboards can be cumbersome
Hybrid Approach
✅ Use Hybrid when:
- Migrating UIKit app to SwiftUI
- Need best of both worlds
- Some features only in UIKit/SwiftUI
Integration:
// UIKit in SwiftUI
UIViewRepresentable / UIViewControllerRepresentable
// SwiftUI in UIKit
UIHostingControllerRecommendation by Project Type
| Project Type | Recommendation | Rationale |
|---|---|---|
| New app (iOS 15+) | SwiftUI | Modern, future-proof |
| New app (iOS 13-14) | SwiftUI (with caution) | Consider UIKit for complex UIs |
| Legacy app | Hybrid | Gradual migration |
| Complex custom UI | UIKit or Hybrid | More control needed |
| Multi-platform | SwiftUI | Better multi-platform support |
Minimum iOS Version
iOS Version Support Strategy
| Version | Release | Market Share (approx) | Recommendation |
|---|---|---|---|
| iOS 18 | 2024 | Growing | Cutting edge only |
| iOS 17 | 2023 | Moderate | Modern apps |
| iOS 16 | 2022 | High | Good balance |
| iOS 15 | 2021 | Very High | Recommended minimum |
| iOS 14 | 2020 | Near universal | Safe minimum |
| iOS 13 | 2019 | Near universal | Only if needed |
Decision Framework
Factors to Consider:
Target Audience Device Age
- Consumer apps: iOS 15+ (reach most users)
- Enterprise apps: Check company policy
- Education: May need older support
Required Features
- iOS 17: TipKit, Observation framework
- iOS 16: Charts, NavigationStack
- iOS 15: async/await, improved SwiftUI
- iOS 14: First stable SwiftUI
Development Speed
- Newer iOS = more features = faster development
- Older iOS = more workarounds = slower development
Recommendations
Personal Projects:
- Minimum: iOS 16 or 17
- Use latest features for learning
Client/Commercial Apps:
- Minimum: iOS 15 (good balance)
- Check client requirements
Enterprise Apps:
- Check company device policy
- Often iOS 15 or 16
General Rule:
- Support last 2-3 major versions
- iOS N-2 is usually safe (e.g., iOS 16 in 2024)
Persistence Layer
Core Data
Best for: Complex data models, relationships, offline-first apps
Strengths:
- Mature, battle-tested
- Object graph management
- Excellent relationship handling
- CloudKit sync built-in
- Powerful querying (NSPredicate)
- Migration support
Limitations:
- Steep learning curve
- Boilerplate code
- Not thread-safe (context management needed)
✅ Use Core Data when:
- Complex data relationships
- Need CloudKit sync
- Large datasets with performance needs
- Offline-first architecture
- iOS 13+ support
SwiftData
Best for: Modern apps (iOS 17+) needing simple persistence
Strengths:
- Modern Swift-first API
- Less boilerplate than Core Data
- Type-safe queries
- SwiftUI integration
- Built on Core Data
Limitations:
- iOS 17+ only
- Newer (less mature)
- Smaller community
✅ Use SwiftData when:
- Targeting iOS 17+
- Want modern persistence
- Building new app
- SwiftUI-first development
Realm
Best for: Alternative to Core Data with easier API
Strengths:
- Easier than Core Data
- Cross-platform (iOS, Android)
- Live objects (auto-updating)
- Good performance
- Rich query API
Limitations:
- Third-party dependency
- Larger app size
- Migration can be tricky
✅ Use Realm when:
- Want easier API than Core Data
- Cross-platform data sharing
- Don't need CloudKit sync
- Prefer third-party solution
UserDefaults
Best for: Simple settings and preferences
Strengths:
- Extremely simple API
- Built-in
- Synchronizes automatically
Limitations:
- Not for large data
- Not for complex data
- Not encrypted (without extra work)
✅ Use UserDefaults when:
- Storing simple settings
- User preferences
- Small amounts of data (<1MB)
Never use for: Sensitive data, large datasets, complex objects
File System (Documents/Caches)
Best for: Files, images, documents
Strengths:
- Direct control
- Good for large files
- Standard approach for documents
Limitations:
- Manual management
- No querying
✅ Use File System when:
- Storing documents/images
- Large files
- User-generated content
Keychain
Best for: Sensitive data (passwords, tokens)
Strengths:
- Encrypted
- Secure
- Persists across app deletions
- Shared between apps (if configured)
Limitations:
- Small data only
- Slightly complex API
✅ Use Keychain when:
- Storing passwords
- API tokens
- Encryption keys
- Any sensitive data
Cloud Sync Options
| Solution | Best For | Cost | Complexity |
|---|---|---|---|
| CloudKit | Apple ecosystem apps | Free (generous limits) | Medium |
| Firebase | Cross-platform apps | Free tier, then paid | Low |
| Custom Backend | Full control needed | Variable | High |
Persistence Recommendations
| Use Case | Recommendation |
|---|---|
| Simple settings | UserDefaults |
| User credentials | Keychain |
| Complex data (iOS 13-16) | Core Data |
| Complex data (iOS 17+) | SwiftData |
| Files/images | File System |
| Easier alternative to Core Data | Realm |
| Need CloudKit sync | Core Data + CloudKit |
Networking Layer
URLSession (Native)
Strengths:
- Built-in (no dependencies)
- Modern async/await support
- Sufficient for most apps
- Well-documented
Limitations:
- More verbose than alternatives
- Basic error handling
✅ Use URLSession when:
- Simple REST API
- Want zero dependencies
- Standard networking needs
Example:
let (data, response) = try await URLSession.shared.data(from: url)Alamofire
Strengths:
- Cleaner API
- Advanced features (retry, authentication)
- Large community
- Good documentation
Limitations:
- Third-party dependency
- Adds app size
✅ Use Alamofire when:
- Complex networking needs
- Want convenience methods
- Need advanced features
- Team familiar with it
Moya
Strengths:
- Type-safe networking
- Protocol-oriented
- Built on Alamofire
- Good for large apps
Limitations:
- More boilerplate
- Learning curve
- Third-party dependency
✅ Use Moya when:
- Large app with many endpoints
- Want type safety
- Prefer protocol-oriented approach
Custom Wrapper
Strengths:
- Tailored to your needs
- Full control
- Can use URLSession underneath
Limitations:
- Development time
- Maintenance burden
✅ Use Custom when:
- Specific requirements
- Want thin abstraction over URLSession
- Educational purposes
Networking Recommendations
| Project Size | Recommendation |
|---|---|
| Small-Medium | URLSession (native) |
| Medium-Large | Alamofire or Custom |
| Enterprise | Moya or Custom |
Dependency Management
Swift Package Manager (SPM)
Strengths:
- Native to Xcode
- No additional tools
- Fast, clean
- Apple's official solution
- Growing ecosystem
Limitations:
- Some packages not available
- Occasional Xcode issues
✅ Use SPM when:
- Starting new project (recommended default)
- Want simplicity
- Packages available via SPM
CocoaPods
Strengths:
- Mature ecosystem
- Most libraries available
- Good for mixed Swift/ObjC
- Centralized versioning
Limitations:
- Requires Ruby/bundler
- Workspace management
- Slower than SPM
✅ Use CocoaPods when:
- Library only on CocoaPods
- Existing project uses it
- Need specific pods
Carthage
Strengths:
- Decentralized
- No code modification
- Builds frameworks
Limitations:
- Declining usage
- Manual integration
- M1/M2 issues
⚠️ Consider alternatives - Carthage is declining
Manual Integration
Strengths:
- Full control
- No dependency manager needed
Limitations:
- Manual updates
- Time-consuming
✅ Use Manual when:
- Single dependency
- Want full control
- Dependency not in package managers
Recommendation
Default: Swift Package Manager
- Use unless specific reason not to
- Modern, supported, growing
Fallback: CocoaPods
- If package not in SPM
- Legacy projects
Popular Third-Party Libraries
Analytics & Crash Reporting
| Library | Purpose | Recommendation |
|---|---|---|
| Firebase Analytics | Analytics + Crashlytics | Popular, free tier |
| Sentry | Crash reporting | Good for serious apps |
| Crashlytics | Crash reporting | Industry standard |
| Mixpanel | Advanced analytics | Good for product analytics |
Recommendation: Firebase (free, comprehensive) or Sentry (professional)
Networking & APIs
| Library | Purpose | When to Use |
|---|---|---|
| Alamofire | HTTP networking | Complex networking |
| Moya | Type-safe API layer | Large apps |
| Apollo iOS | GraphQL client | GraphQL APIs |
Recommendation: URLSession (default) or Alamofire (if needed)
UI Components
| Library | Purpose | When to Use |
|---|---|---|
| Lottie | Animations | Rich animations |
| SnapKit | Auto Layout DSL | UIKit projects |
| SDWebImage | Image loading | UIKit image caching |
| Kingfisher | Image loading | Swift-first image caching |
Recommendation: Only add if needed; native solutions often sufficient
Authentication
| Library | Purpose | When to Use |
|---|---|---|
| Firebase Auth | Auth backend | Need backend-as-service |
| Auth0 | Auth service | Enterprise auth |
| Sign in with Apple | Native auth | Recommended for all apps |
Recommendation: If you offer third-party or social login (Google, Facebook, etc.) for the primary account, Guideline 4.8 requires an equivalent login option that limits data to name and email, lets users keep their email private, and doesn't collect interactions for advertising without consent. Sign in with Apple qualifies. See 4.8 for exemptions. Add Firebase/Auth0 if needed.
Database/Persistence
| Library | Purpose | When to Use |
|---|---|---|
| Realm | Mobile database | Alternative to Core Data |
| GRDB | SQLite wrapper | SQL preference |
Recommendation: Core Data/SwiftData (native) unless specific need
Testing
| Library | Purpose | When to Use |
|---|---|---|
| Quick/Nimble | BDD testing | Team prefers BDD |
| Snapshot Testing | UI snapshot tests | Visual regression testing |
| OHHTTPStubs | Network mocking | Mock network requests |
Recommendation: XCTest (built-in) + Snapshot Testing if needed
Utilities
| Library | Purpose | When to Use |
|---|---|---|
| SwiftLint | Code linting | Code quality (recommended) |
| SwiftFormat | Code formatting | Consistent style |
| R.swift | Type-safe resources | Large projects |
Recommendation: SwiftLint (always) + SwiftFormat
Backend Options
CloudKit
Best for: Apple ecosystem apps with simple backend needs
Strengths:
- Free (generous limits)
- Native integration
- iCloud integration
- Privacy-focused
Limitations:
- Apple ecosystem only
- Limited compared to full backend
- Learning curve
✅ Use CloudKit when:
- Simple data sync
- Apple ecosystem only
- Free solution needed
- Privacy important
Firebase
Best for: Rapid development, cross-platform apps
Strengths:
- Comprehensive BaaS
- Real-time database
- Free tier
- Great documentation
- Authentication included
Limitations:
- Vendor lock-in
- Can get expensive at scale
- Google-owned
✅ Use Firebase when:
- Need full backend quickly
- Cross-platform app
- Real-time features
- Want managed solution
Supabase
Best for: Open-source Firebase alternative
Strengths:
- Open source
- PostgreSQL backend
- Real-time capabilities
- Good pricing
Limitations:
- Newer than Firebase
- Smaller community
✅ Use Supabase when:
- Want Firebase-like but open source
- Need PostgreSQL
- Prefer open source
Custom Backend
Best for: Specific requirements, full control
Technologies:
- Vapor (Swift)
- Node.js + Express
- Django/Flask (Python)
- Ruby on Rails
✅ Use Custom Backend when:
- Specific requirements
- Need full control
- Have backend expertise
- Complex business logic
Backend Recommendations
| Use Case | Recommendation |
|---|---|
| Simple sync | CloudKit |
| Rapid development | Firebase |
| Open source preference | Supabase |
| Complex requirements | Custom backend |
| No backend needed | Local-only app |
Development Tools
Essential Tools
| Tool | Purpose | Cost | Recommendation |
|---|---|---|---|
| Xcode | IDE | Free | Required |
| SF Symbols | System icons | Free | Use extensively |
| Instruments | Profiling | Free | Learn it |
| SwiftLint | Linting | Free | Always use |
| Proxyman/Charles | Network debugging | Paid/Free | Very helpful |
CI/CD Options
| Service | Best For | Cost |
|---|---|---|
| Xcode Cloud | Apple integration | Paid |
| GitHub Actions | GitHub projects | Free tier |
| Bitrise | Mobile-focused | Free tier |
| Fastlane | Automation | Free (self-hosted) |
Recommendation: GitHub Actions (if on GitHub) or Xcode Cloud
Decision Framework
Step 1: Start with Defaults
Recommended default stack for new iOS apps:
UI: SwiftUI (iOS 15+)
Architecture: MVVM
Persistence: Core Data or SwiftData
Networking: URLSession
Dependencies: Swift Package Manager
Linting: SwiftLint
Backend: CloudKit (if needed) or FirebaseStep 2: Adjust for Requirements
Modify based on:
- iOS version constraints
- Team experience
- Specific features needed
- Performance requirements
- Budget constraints
Step 3: Minimize Dependencies
Philosophy: Use native solutions unless there's a clear benefit to third-party
Before adding a dependency, ask:
- Can I use a native solution?
- Is this dependency actively maintained?
- Does the benefit outweigh the cost?
- How many users does it have?
- Is it well-documented?
Sample Tech Stacks
Minimal Personal Project
UI: SwiftUI
iOS: 16+
Architecture: MVVM
Persistence: UserDefaults + File System
Networking: URLSession
Dependencies: SPM
Third-party: None (native only)Standard Commercial App
UI: SwiftUI
iOS: 15+
Architecture: MVVM
Persistence: Core Data + CloudKit
Networking: URLSession or Alamofire
Dependencies: SPM
Third-party:
- SwiftLint (linting)
- Firebase Analytics & Crashlytics
- Kingfisher (image caching)
Backend: Firebase or CustomEnterprise App
UI: SwiftUI + UIKit (hybrid)
iOS: 14+
Architecture: MVVM or TCA
Persistence: Core Data
Networking: Moya or Custom
Dependencies: SPM + CocoaPods
Third-party:
- SwiftLint
- Sentry (crash reporting)
- Custom analytics
- Auth0 (authentication)
Backend: Custom REST/GraphQL API
CI/CD: Xcode Cloud or BitriseStartup MVP
UI: SwiftUI
iOS: 15+
Architecture: MVVM
Persistence: Firebase Firestore
Networking: URLSession
Dependencies: SPM
Third-party:
- Firebase (everything)
- SwiftLint
Backend: FirebaseResources
- Swift Package Index - Discover SPM packages
- CocoaPods - CocoaPods directory
- iOS Dev Directory - Curated iOS resources
- Awesome iOS - Curated list
- Swift.org - Official Swift resources
Summary
Default Recommendations:
- UI: SwiftUI (unless iOS <14)
- Minimum iOS: 15 (good balance)
- Persistence: Core Data or SwiftData
- Networking: URLSession (sufficient for most)
- Dependencies: Swift Package Manager
- Backend: CloudKit (simple) or Firebase (comprehensive)
Key Principle: Start simple, add complexity only when needed