Overview
Bundle size analysis provides:Size Tracking
Monitor install and download sizes over time
Detailed Breakdown
See size contribution of every file and framework
Size Trends
Track size changes across branches and versions
Understanding your appβs size is critical for user acquisition. A 6MB increase can reduce downloads by up to 23% in emerging markets.
Key Metrics
Install Size
What it is: The amount of storage your app occupies on a device after installation.- Includes all resources, frameworks, and assets
- Uncompressed size
- What users see in Settings > Storage
Download Size
What it is: The size of the app package users download from the App Store.- Compressed .ipa file
- App Store Connect measurement
- Varies by device (App Thinning)
Size Breakdown
Detailed analysis of size contributors:Getting Started
Upload bundle for analysis
Share the app to generate bundle analysis:Tuist automatically analyzes the bundle and uploads metrics.
Viewing Bundle Analysis
Dashboard
Access bundle analysis in Tuist Cloud:- Navigate to your project
- Go to Insights > Bundle Size
- View size trends and breakdowns
Bundle Explorer
Interactive tree view of your appβs contents:- Tree View
- List View
- Charts
Navigate the bundle hierarchy:
- Expand/collapse directories
- See size and percentage of each item
- Sort by size
- Filter by file type
Size Trends
Historical Tracking
Monitor size changes over time:Deviation Tracking
See size changes compared to baseline:- π’ Within target: Size is stable
- π‘ Small increase: +2-5% growth
- π΄ Large increase: +5%+ growth (needs attention)
Branch Comparison
Compare feature branch size against main:| Branch | Install Size | vs Main | Download Size | vs Main |
|---|---|---|---|---|
| main | 87.2 MB | - | 42.3 MB | - |
| feature/video | 95.8 MB | π΄ +9.9% | 46.1 MB | +9.0% |
| fix/images | 85.1 MB | π’ -2.4% | 41.2 MB | -2.6% |
Optimization Strategies
Identify Large Assets
Analyze necessity
Question each large file:
- Is it essential?
- Can it be smaller?
- Could it be on-demand?
Image Optimization
Use Asset Catalogs
Use Asset Catalogs
- Enable App Thinning automatically
- Device-specific image delivery
- Compression optimization
Choose the right format
Choose the right format
- HEIC/WebP: Best compression for photos
- PNG: Transparency required
- SVG: Vector graphics (via SF Symbols or PDF)
Compress images
Compress images
Use tools like ImageOptim or tinypng:Can reduce size by 30-60% without visible quality loss.
Lazy load when possible
Lazy load when possible
Download heavy images on-demand:
Code Optimization
Remove unused code
Remove unused code
- Delete dead code paths
- Remove unused dependencies
- Audit third-party libraries
Enable optimization flags
Enable optimization flags
In release builds:
Use dynamic frameworks sparingly
Use dynamic frameworks sparingly
Dynamic frameworks add overhead:
- Prefer static linking for small frameworks
- Only use dynamic for shared or plugin frameworks
Dependency Audit
Find lighter alternatives
- Do you need the full library?
- Can you implement the feature yourself?
- Are there smaller alternatives?
CI/CD Integration
Automatic Size Tracking
Track bundle size in every build:GitHub Actions
PR Size Warnings
Get notified of size changes in pull requests:Size Budgets
Enforce size limits:Best Practices
Set Size Budgets
Define acceptable size ranges:
- Max install size
- Max download size
- Max per-release increase
Monitor Regularly
Check bundle analysis:
- Every release
- After adding dependencies
- When users report issues
Optimize Assets First
Assets are usually the biggest wins:
- Images: 30-60% savings
- Videos: Consider streaming
- Fonts: Subset unused glyphs
Review Dependencies
Audit third-party libraries:
- Quarterly dependency review
- Remove unused packages
- Find lighter alternatives
App Thinning
Leverage Appleβs App Thinning:Slicing
What it is
What it is
App Store delivers device-specific assets:
- iPhone 15 Pro gets @3x images only
- iPad gets iPad-specific resources
- Older devices get compatible assets
Bitcode (Deprecated)
Note
Note
Bitcode was deprecated in Xcode 14. Modern apps use Metal shader compilation instead.
On-Demand Resources
What it is
What it is
Resources downloaded when needed:
- Game levels
- Tutorial content
- Additional languages
Performance Impact
Bundle size affects user experience:| Size | User Impact |
|---|---|
| <50 MB | π’ Excellent - Quick downloads, minimal storage concern |
| 50-100 MB | π‘ Good - Acceptable for most users |
| 100-200 MB | π Fair - Slower downloads, storage consideration |
| >200 MB | π΄ Poor - Requires WiFi, significant storage, lower conversion |
For every 6MB increase, expect a ~1% decrease in download conversion rate.
Next Steps
Build Insights
Analyze build performance and compilation time
Binary Caching
Speed up builds with intelligent caching