Add BGTaskScheduler-based background sync for keeping local data fresh: - BackgroundSyncManager: New singleton managing background tasks - BGAppRefreshTask for periodic CloudKit sync (system-determined frequency) - BGProcessingTask for overnight sync + database cleanup (2 AM) - Auto-archives games older than 1 year during cleanup - Info.plist: Added BGTaskSchedulerPermittedIdentifiers - com.sportstime.app.refresh (periodic sync) - com.sportstime.app.db-cleanup (overnight processing) - SportsTimeApp: Integrated background task lifecycle - Register tasks in init() (required before app finishes launching) - Schedule tasks after bootstrap and when app enters background Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
18 lines
493 B
Plaintext
18 lines
493 B
Plaintext
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>UIBackgroundModes</key>
|
|
<array>
|
|
<string>remote-notification</string>
|
|
<string>fetch</string>
|
|
<string>processing</string>
|
|
</array>
|
|
<key>BGTaskSchedulerPermittedIdentifiers</key>
|
|
<array>
|
|
<string>com.sportstime.app.refresh</string>
|
|
<string>com.sportstime.app.db-cleanup</string>
|
|
</array>
|
|
</dict>
|
|
</plist>
|