A native macOS application for tracking Battlefield 6 player statistics with comprehensive historical analytics
Features โข Installation โข Usage โข Screenshots
- Overview Stats: Kills, deaths, K/D ratio, accuracy, win/loss, score per minute, and more
- Class Performance: Detailed stats for all 4 classes (Assault, Engineer, Support, Recon)
- Weapon Arsenal: 45+ weapons across 8 categories with accuracy, headshots, KPM, and damage
- Vehicle Combat: 8 vehicle categories with kills, destroyed count, and usage time
- Gadget Analysis: Complete gadget statistics with kills, uses, and effectiveness
- Last Match Stats: Real-time performance from your most recent match
- Map Statistics: Per-map performance tracking with K/D and win rates
- Server Browser: Browse and filter active BF6 servers by platform, region, and mode
NEW: All historical data is tracked locally using SwiftData - no API needed!
- Automatic Snapshots: Stats automatically saved on every refresh
- Performance Trends: K/D, accuracy, and KPM trends over time
- Play Sessions: Track gaming sessions with start/end times and stats gained
- Progress Analytics: Identify improving, declining, or stable performance
- Map Mastery: Build real per-map statistics as you play
- Data Ownership: All data stored locally and privately on your Mac
- Dark Theme: Sleek dark interface optimized for the Battlefield aesthetic
- 10 Comprehensive Tabs: Overview, History, Maps, Charts, Classes, Weapons, Gadgets, Vehicles, Loadout, Servers
- Draggable Class Tiles: Interactive, rearrangeable class performance cards
- Advanced Charts: Swift Charts integration with line graphs, bar charts, and pie charts
- Responsive Layout: Adaptive design for different window sizes
- Smooth Animations: Spring animations, transitions, and hover effects
- EA Login: Optional EA account authentication for automatic player detection
- Secure OAuth: Uses EA's official authentication (EAIdentityKit)
- Auto-Detection: Automatically fetches your EA ID, Nucleus ID, and Persona ID
- Manual Fallback: Can also manually enter player name and platform
-
Loadout Analyzer:
- Overall effectiveness scoring (0-100%)
- Best loadout recommendations
- Weapon performance comparison charts
- Playstyle identification (Aggressive Slayer, Team Medic, etc.)
- Strengths & weaknesses analysis
- 3-step improvement roadmap
-
Performance Charts:
- K/D trend over time (line chart)
- Weapon usage distribution (pie chart)
- Top weapons comparison (bar chart)
- Accuracy and headshot trends
-
Map Statistics:
- Grid/List view modes
- K/D comparison charts across maps
- Best/worst performing maps
- Performance badges (Elite, Great, Good, Practice)
- Win rate tracking per map
- 5-Minute Cache: Smart caching to reduce API calls
- Auto-Refresh: Configurable automatic stats refresh (1-30 minutes)
- SwiftData Persistence: Local database for historical tracking
- Rate Limiting: Built-in API rate limiting protection
- Background Refresh: Fresh data on app startup
- Collapsible Window: Minimize to menu bar for quick access
- Quick Stats View: See key stats without opening the full app
- Always Available: Runs in background for instant access
- Command Menu: Keyboard shortcuts for common actions
- macOS: 14.0 (Sonoma) or later
- Xcode: 15.0+ (for development)
- Internet: Required for API access
- Storage: ~10MB app + minimal space for historical data (~2MB/year)
-
Clone the repository
git clone https://github.com/yourusername/BF6StatsTracker.git cd BF6StatsTracker -
Open in Xcode
open BF6StatsTracker.xcodeproj
-
Configure signing
- Select the project in Xcode
- Go to "Signing & Capabilities"
- Select your development team
-
Build and run
- Press
โRor click the Play button - App will launch with SwiftData initialized
- Press
- In Xcode:
Product โ Archive - In Organizer: Click "Distribute App"
- Choose "Copy App" for local distribution
- Export the
.appfile to Applications folder
- Launch BF6 Stats Tracker
- Click โ๏ธ Settings in the sidebar
- Under "EA Account", click Sign in with EA
- Authenticate with your EA credentials
- Your player name and platform are automatically detected
- Launch BF6 Stats Tracker
- Click โ๏ธ Settings
- Under "Player", enter your exact Battlefield 6 player name (case-sensitive)
- Select your platform (PC, PlayStation, Xbox)
- Click Save Settings
- Stats will load automatically
The app features 10 comprehensive tabs:
| Tab | Icon | Description |
|---|---|---|
| Overview | ๐ | General stats summary with highlights and last match performance |
| History | ๐ | Play session history with stats gained per session |
| Maps | ๐บ๏ธ | Per-map performance with K/D comparisons and win rates |
| Charts | ๐ | Performance trends over time with multiple visualizations |
| Classes | ๐ค | Draggable class tiles with detailed performance metrics |
| Weapons | ๐ซ | All weapons filtered by category with detailed stats |
| Gadgets | ๐ฃ | All gadgets with usage statistics and effectiveness |
| Vehicles | ๐ | All vehicles filtered by type with combat stats |
| Loadout | ๐ | Loadout analysis with recommendations and insights |
| Servers | ๐ | Browse active BF6 servers with filtering and favorites |
- Automatic: Stats saved on every refresh
- View Trends: Check "Charts" tab for K/D, accuracy, KPM over time
- Sessions: "History" tab shows your play sessions
- Clear Data: Settings โ Data Management โ Clear History
- Grid/List: Toggle view modes for different perspectives
- Charts: Enable comparison chart to see K/D across maps
- Search: Filter maps by name
- Sort: By matches played, K/D, win rate, kills, or name
- 5 Tabs: Overview, Weapons, Classes, Gadgets, Insights
- Effectiveness Score: 0-100% based on K/D, accuracy, headshots, win rate, team support
- Recommendations: Get weapon and playstyle suggestions
- Roadmap: 3-step improvement plan
- Filters: Platform, region, mode, capacity
- Sort: By players, name, region, favorites
- Favorites: Star servers for quick access
- Details: Expand cards for map rotation and server info
| Shortcut | Action |
|---|---|
โR |
Refresh stats |
โ, |
Open settings |
โK โงโK |
Clear cache |
โQ |
Quit application |
Add screenshots here showing:
- Main overview with stats
- Map statistics view
- Loadout analyzer
- Performance charts
- Server browser
- Settings panel
This app uses the GameTools.Network free API for fetching Battlefield 6 statistics.
| Endpoint | Purpose | Cached |
|---|---|---|
/bf6/stats/ |
Player overview statistics | 5 min |
/bf6/weapons/ |
Detailed weapon stats | 5 min |
/bf6/vehicles/ |
Detailed vehicle stats | 5 min |
/bf6/gadgets/ |
Detailed gadget stats | 5 min |
/bf6/classes/ |
Detailed class stats | 5 min |
/bf6/servers/ |
Active server list | Real-time |
- Minimum interval: 1 second between requests
- Cache duration: 5 minutes for player data
- Automatic retry: On rate limit errors
- Snapshot saving: No API calls (uses SwiftData)
- โ No historical data - API only provides current stats
- โ Solution: App builds history locally using SwiftData
- โ No per-map stats - API doesn't break down by map
- โ Solution: App distributes stats across maps intelligently
- โ No match history - API doesn't provide match-by-match data
- โ Solution: App tracks snapshots on each refresh
BF6StatsTracker/
โโโ BF6StatsTrackerApp.swift # App entry + SwiftData setup
โโโ ContentView.swift # Main navigation
โ
โโโ Models/
โ โโโ Models.swift # PlayerStats, WeaponStats, etc.
โ โโโ StatsSnapshot.swift # SwiftData models (snapshots, sessions, maps)
โ โโโ ServerModels.swift # Server & filter models
โ
โโโ Services/
โ โโโ APIService.swift # GameTools API client
โ โโโ CacheManager.swift # 5-minute cache system
โ โโโ HistoryManager.swift # SwiftData snapshot management
โ โโโ MapTracker.swift # Per-map statistics tracking
โ โโโ ImageLoader.swift # Image loading & caching
โ
โโโ ViewModels/
โ โโโ StatsViewModel.swift # Main app state & logic
โ
โโโ Views/
โ โโโ PlayerSearchView.swift # Player search
โ โโโ OverviewStatsView.swift # Overview tab
โ โโโ SessionHistoryView.swift # History tab with sessions
โ โโโ MapStatsView.swift # Maps tab with charts
โ โโโ PerformanceChartsView.swift # Charts tab with trends
โ โโโ ClassTileView.swift # Draggable class tiles
โ โโโ DraggableTileContainer.swift
โ โโโ WeaponStatsView.swift # Weapons tab
โ โโโ GadgetStatsView.swift # Gadgets tab
โ โโโ VehicleStatsView.swift # Vehicles tab
โ โโโ LoadoutAnalyzerView.swift # Loadout tab with analysis
โ โโโ ServerBrowserView.swift # Server browser tab
โ โโโ EALoginView.swift # EA authentication
โ โโโ MenuBarView.swift # Menu bar extra
โ โโโ SettingsView.swift # Settings with data management
โ
โโโ Utilities/
โโโ Extensions.swift # Helper extensions
All historical data is stored locally using SwiftData:
- Location:
~/Library/Application Support/BF6StatsTracker/ - Size: ~500 bytes per snapshot, ~2MB per year of daily tracking
- Privacy: All data stays on your Mac, never sent anywhere
- Deletion: Settings โ Data Management โ Clear History
- Stats Snapshots - Complete player stats at each refresh
- Play Sessions - Gaming sessions with start/end times
- Map Statistics - Per-map performance tracking
- Memory Cache: Current session only
- Disk Cache: 5-minute expiry for API responses
- Clearable: Settings โ Clear Cache
- Assault: Frontline infantry with breach-and-clear gadgets
- Engineer: Vehicle specialist with repair and anti-vehicle tools
- Support: Combat medic with healing, resupply, and revive
- Recon: Sniper and intelligence specialist
- Assault Rifles, Carbines, SMGs, LMGs
- DMRs, Sniper Rifles, Shotguns, Pistols
- Main Battle Tank, Light Armor, Anti-Aircraft, Attack Helicopter
- Transport Helicopter, Jet, Transport Vehicle, Watercraft
- Stranded, Renewal, Hourglass, Kaleidoscope
- Manifest, Breakaway, Discarded, Orbital
- Exposure, Ridge, Spearhead
- SwiftUI - Modern declarative UI framework
- SwiftData - Local persistence and historical tracking
- Swift Charts - Data visualization
- Async/Await - Asynchronous API calls
- EAIdentityKit - EA OAuth authentication
- Combine - Reactive programming for state management
- Clone the repository
- Open in Xcode 15+
- Select your development team
- Build for macOS 14.0+
Contributions are welcome! Please feel free to submit issues or pull requests.
Additional documentation available:
- PERSISTENCE_STRATEGY.md - Complete SwiftData implementation details
- API_FIXES.md - API endpoint fixes and workarounds
- ENHANCEMENTS_SUMMARY.md - UI enhancements breakdown
- CLEAR_HISTORY_FEATURE.md - Data management feature guide
This project is provided as-is for educational and personal use.
This is an unofficial application and is not affiliated with, endorsed by, or connected to Electronic Arts, EA DICE, or the Battlefield franchise. All game content, images, and trademarks are property of their respective owners.
- GameTools.Network - Free Battlefield stats API
- EA - Battlefield franchise and assets
- Battlefield Community - Inspiration and feedback
Made with โค๏ธ for the Battlefield community
Report Bug โข Request Feature โข Documentation