Skip to content

Commit 7116f5f

Browse files
committed
docs: fix incorrect UIBackgroundModes documentation
- Remove invalid 'processing' value from UIBackgroundModes - Add clarification that BGTaskScheduler doesn't require UIBackgroundModes - Link to Apple's official UIBackgroundModes documentation - Update workmanager version to 0.9.0 in installation instructions Fixes #633
1 parent aa9e3b6 commit 7116f5f

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

docs/quickstart.mdx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Add `workmanager` to your `pubspec.yaml`:
99

1010
```yaml
1111
dependencies:
12-
workmanager: ^0.8.0
12+
workmanager: ^0.9.0
1313
```
1414
1515
Then run:
@@ -45,19 +45,19 @@ For regular data sync, notifications, cleanup - uses iOS Background Fetch:
4545
#### Option B: Processing Tasks (For complex operations)
4646
For file uploads, data processing, longer tasks - uses BGTaskScheduler:
4747

48-
1. **Enable Background Modes** in Xcode target capabilities ([Xcode Help](https://help.apple.com/xcode/mac/current/#/devbfa1532c4)) and add to Info.plist:
48+
1. **Enable Background Modes** in Xcode target capabilities ([Xcode Help](https://help.apple.com/xcode/mac/current/#/devbfa1532c4)) and configure Info.plist:
4949
```xml
50-
<key>UIBackgroundModes</key>
51-
<array>
52-
<string>processing</string>
53-
</array>
54-
50+
<!-- Note: BGTaskScheduler doesn't require UIBackgroundModes entry -->
5551
<key>BGTaskSchedulerPermittedIdentifiers</key>
5652
<array>
5753
<string>com.yourapp.processing_task</string>
5854
</array>
5955
```
6056

57+
<Info>
58+
**Note on UIBackgroundModes:** BGTaskScheduler processing tasks don't require a UIBackgroundModes entry. The `processing` value is not a valid UIBackgroundModes option. Only add `BGTaskSchedulerPermittedIdentifiers` to enable processing tasks. See [Apple's UIBackgroundModes documentation](https://developer.apple.com/documentation/bundleresources/information-property-list/uibackgroundmodes) for valid background modes.
59+
</Info>
60+
6161
2. **Configure AppDelegate.swift** (required for BGTaskScheduler):
6262
```swift
6363
import workmanager_apple
@@ -75,13 +75,9 @@ WorkmanagerPlugin.registerBGProcessingTask(
7575
#### Option C: Periodic Tasks with Custom Frequency
7676
For periodic tasks with more control than Background Fetch - uses BGTaskScheduler with frequency:
7777

78-
1. **Enable Background Modes** in Xcode target capabilities ([Xcode Help](https://help.apple.com/xcode/mac/current/#/devbfa1532c4)) and add to Info.plist:
78+
1. **Configure Info.plist** for BGTaskScheduler:
7979
```xml
80-
<key>UIBackgroundModes</key>
81-
<array>
82-
<string>processing</string>
83-
</array>
84-
80+
<!-- Note: BGTaskScheduler doesn't require UIBackgroundModes entry -->
8581
<key>BGTaskSchedulerPermittedIdentifiers</key>
8682
<array>
8783
<string>com.yourapp.periodic_task</string>

0 commit comments

Comments
 (0)