Complete setup guide: See
/docs/integrations/Crashlytics.md in the projectWhat is Crashlytics?
Crash Reports
Automatic crash detection with stack traces
Error Tracking
Non-fatal errors and custom logging
User Privacy
GDPR compliant with user consent toggle
Free Tier
Unlimited reports on Firebase free tier
Quick Setup
1
Create Firebase Project
- Go to Firebase Console
- Click “Add project”
- Enter project name
- Create project
2
Add iOS App
- Firebase Console → Add app → iOS
- Enter your bundle ID (from
Config/App.xcconfig) - Download
GoogleService-Info.plist
3
Add to Xcode
- Drag
GoogleService-Info.plistinto Xcode - ✅ Check “Copy items if needed”
- ✅ Select “SwiftAIBoilerplatePro” target
- Click “Add”
4
Enable Feature Flag
Edit
SwiftAIBoilerplatePro/Composition/FeatureFlags.swift:5
Build and Run
The boilerplate automatically:
- Detects GoogleService-Info.plist
- Initializes Crashlytics
- Sets up user tracking
- Respects user privacy settings
How It Works
Automatic Integration
The boilerplate includes a CrashReporter protocol that automatically switches between Firebase Crashlytics and NoOp based on availability:User Privacy
Users control crash reporting in Settings → Share Diagnostics:- ✅ ON → Crashes sent to Firebase
- ❌ OFF → No data sent
- Never sends email addresses
- User has opt-out control
- Clear privacy disclosure
What Gets Tracked
Automatically
- Crash reports with stack traces
- Device info (model, iOS version)
- App version
- User ID (anonymized, no email)
- Session info
Custom (Optional)
- Non-fatal errors
- Custom logs/breadcrumbs
- User attributes (subscription tier, theme, etc.)
Testing
Test Crash Reporting
- Tap “Test Crash” button
- App crashes
- Restart app
- Wait 5 minutes
- Check Firebase Console → Crashlytics
Test Non-Fatal Errors
Viewing Reports
Firebase Console:- Go to Firebase Console
- Select your project
- Crashlytics (in sidebar)
- View crashes, errors, logs
- Stack traces
- Device information
- User ID
- App version
- Custom logs
Cost
Firebase Free Tier:- ✅ Unlimited crash reports
- ✅ 30-day retention
- ✅ Basic analytics
- ✅ Enough for most apps
- Extended retention
- More features
- Pay as you go (very low cost)
Related Guides
Full Integration Guide
See complete details in
/docs/integrations/Crashlytics.mdFeature Flags
Configure in
Composition/FeatureFlags.swiftSettings Module
User consent toggle
Privacy Policy
Update
Resources/privacy.md to mention crash reportingNeed Help?
The boilerplate handles all the integration automatically. You just need to:- Add
GoogleService-Info.plist - Enable feature flag
- Build and run
/docs/integrations/Crashlytics.md.