Skip to content

Commit 5f120ea

Browse files
enedclaude
andcommitted
fix: clarify iOS Background Fetch needs no AppDelegate configuration
- Remove unnecessary registerPeriodicTask from Background Fetch setup - Clarify that only BGTaskScheduler (Option B) requires AppDelegate registration - Background Fetch (Option A) works automatically with just Info.plist setup - Update info callout to explain difference between the two approaches - Make it clear which setup steps apply to which iOS background API 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent f8e5c41 commit 5f120ea

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

docs/quickstart.mdx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,9 @@ For regular data sync, notifications, cleanup - uses iOS Background Fetch:
4141
</array>
4242
```
4343

44-
3. **Configure AppDelegate.swift**:
45-
```swift
46-
import workmanager_apple
47-
48-
// In application didFinishLaunching
49-
WorkmanagerPlugin.registerPeriodicTask(
50-
withIdentifier: "com.yourapp.periodic_task",
51-
frequency: NSNumber(value: 15 * 60) // 15 minutes minimum
52-
)
53-
```
44+
3. **No AppDelegate configuration needed!**
45+
46+
The Background Fetch approach works automatically - just schedule tasks from your Dart code.
5447

5548
#### Option B: Processing Tasks (For complex operations)
5649
For file uploads, data processing, longer tasks - uses BGTaskScheduler:
@@ -71,7 +64,7 @@ For file uploads, data processing, longer tasks - uses BGTaskScheduler:
7164
</array>
7265
```
7366

74-
3. **Configure AppDelegate.swift**:
67+
3. **Configure AppDelegate.swift** (required for BGTaskScheduler):
7568
```swift
7669
import workmanager_apple
7770

@@ -82,7 +75,7 @@ WorkmanagerPlugin.registerBGProcessingTask(
8275
```
8376

8477
<Info>
85-
**Why this configuration 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. This prevents apps from scheduling unauthorized background work.
78+
**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.
8679
</Info>
8780

8881
<Success>

0 commit comments

Comments
 (0)