You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix iOS task identifier mismatch in Quick Start documentation
## Problem
The current Quick Start guide shows task identifiers that don't match between Dart and iOS native code, which causes `BGTaskSchedulerErrorDomain Code 3` errors on iOS.
**Current Issue:**
- Info.plist: `com.yourapp.processing_task`
- AppDelegate: `com.yourapp.processing_task`
- Dart code: `"data_sync"` ❌ (doesn't match!)
This mismatch prevents iOS background tasks from being scheduled successfully.
## Solution
Update documentation to show that **all three locations must use the same identifier**:
- Info.plist: `com.yourapp.processing_task`
- AppDelegate: `com.yourapp.processing_task`
- Dart code: `com.yourapp.processing_task` ✅
## Testing
Tested on iOS 26 with BGTaskScheduler - background tasks now schedule successfully without Code 3 errors.
**iOS Task Identifier Matching:** The task name in your Dart code must **exactly match** the identifier in Info.plist and AppDelegate. Using short names like `"data_sync"` in Dart while having `com.yourapp.processing_task` in native code will cause `BGTaskSchedulerErrorDomain Code 3` errors.
82
+
</Warning>
83
+
80
84
<Info>
81
85
**Why BGTaskScheduler registration is needed:** iOS requires explicit registration of background task identifiers for security and system resource management. The task identifier in Info.plist tells iOS which background tasks your app can schedule, while the AppDelegate registration connects the identifier to the actual task handler. Background Fetch (Option A) doesn't require this since it uses the simpler, system-managed approach.
**iOS Task Identifier Matching:** The task name in your Dart code must **exactly match** the identifier in Info.plist and AppDelegate. Using short names like `"cleanup"` in Dart while having `com.yourapp.periodic_task` in native code will cause `BGTaskSchedulerErrorDomain Code 3` errors.
117
+
</Warning>
118
+
111
119
<Success>
112
120
**Which option to choose?**
113
121
-**Option A (Background Fetch)** for non-critical updates that can happen once daily (data sync, content refresh)
0 commit comments