Overview
Bundle Analysis provides:- Size tracking: Monitor download and install sizes
- Component breakdown: See what takes up space
- Trend analysis: Track size changes over time
- Regression detection: Alert on unexpected size increases
- Optimization recommendations: Suggestions to reduce size
Prerequisites
- Authenticate with Tuist Cloud
- Configure your project:
Config.swift
Uploading Bundles for Analysis
iOS Bundles (IPA)
Upload an IPA for analysis:- Extract the IPA contents
- Analyze all components (binaries, assets, resources)
- Calculate download and install sizes
- Upload analysis to cloud
macOS Bundles (.app)
Analyze macOS app bundles:Android Bundles (APK/AAB)
Upload Android bundles:Archives (.xcarchive)
Analyze Xcode archives:Bundle analysis automatically happens when you upload previews with
tuist share.Bundle Components
What Gets Analyzed
The service analyzes:- Executables: Main binary and embedded frameworks
- Assets: Images, icons, asset catalogs
- Resources: Localization files, fonts, data files
- Frameworks: Embedded frameworks and libraries
- Debug symbols: dSYM files (if included)
Size Metrics
Two key metrics are tracked:- Download size: Compressed size users download from the App Store
- Install size: Uncompressed size on device
Viewing Bundle Analysis
List Bundles
View all analyzed bundles:- Bundle version and build number
- Upload date
- Download and install sizes
- Platform and supported devices
Bundle Details
Get detailed analysis for a specific bundle:- Size breakdown by component type
- Largest files
- Comparison with previous version
- Optimization suggestions
Web Dashboard
Access the bundle analysis dashboard:- Interactive size trend charts
- Component breakdown visualizations
- File-level drill-down
- Historical comparisons
Component Breakdown
By File Type
See size distribution by file type:By Framework
Break down by embedded frameworks:Largest Files
Identify the biggest individual files:Size Trends
Historical Tracking
Track size changes over time:Size Budget
Set size budgets and get alerts:Config.swift
- CI builds fail
- Team receives notifications
- Analysis shows what caused the increase
Regression Detection
Automatic Alerts
Get notified when bundle size increases unexpectedly:CI Integration
Fail CI builds on size regressions:.github/workflows/build.yml
PR Comments
Post bundle analysis on pull requests:Optimization Recommendations
Image Optimization
Tuist identifies opportunities to:- Convert images to WebP or HEIC
- Remove unused @3x assets
- Compress asset catalogs
- Use lossy compression where appropriate
Asset Catalog Analysis
Suggestions for asset catalogs:Framework Optimization
- Identify unused frameworks to remove
- Suggest dynamic framework candidates
- Recommend framework thinning
Code Optimization
- Dead code detection
- Unused symbols
- Duplicate symbols across frameworks
App Store Size Estimation
Universal vs App Thinning
Compare universal binary size with thinned sizes:Per-Device Estimates
Estimate size for different devices:Advanced Analysis
Binary Symbol Analysis
Analyze what’s in your executable:- Largest symbols
- Unused symbols (with optimization flags)
- Swift vs Objective-C distribution
- Standard library overhead
Localization Analysis
Break down by language:- Remove unused localizations
- Use on-demand resources
- Optimize string files
On-Demand Resources
Track on-demand resource usage:CI/CD Integration
Automated Bundle Uploads
.github/workflows/release.yml
Size Regression Check
Best Practices
Set and enforce size budgets
Set and enforce size budgets
Define acceptable size limits and fail CI builds that exceed them.
Analyze every release candidate
Analyze every release candidate
Always run bundle analysis before submitting to App Store.
Track size in code review
Track size in code review
Include bundle size changes in PR descriptions and reviews.
Optimize assets regularly
Optimize assets regularly
Run asset optimization passes quarterly to compress and remove unused assets.
Use on-demand resources
Use on-demand resources
Move non-essential content to on-demand resources to reduce initial download.
Troubleshooting
Analysis Fails
If bundle analysis fails:- Verify the bundle is valid and builds successfully
- Check authentication:
tuist auth whoami - Ensure sufficient storage quota
Inaccurate Size Estimates
If size estimates seem wrong:- Compare with actual App Store Connect sizes
- Verify bitcode settings (if applicable)
- Check app thinning configuration
Missing Components
If some components aren’t analyzed:- Ensure all assets are included in the bundle
- Verify embedded frameworks are present
- Check that the archive includes all targets
Next Steps
Build Insights
View bundle size trends in the insights dashboard
Optimization Guide
Learn techniques to reduce app size