Skip to content

Commit aef64d8

Browse files
committed
Expanded on limitations
1 parent 6a98682 commit aef64d8

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,14 @@ an object of the following shape:
123123
- **`BackgroundTask.UNAVAILABLE_RESTRICTED`**: - Background updates
124124
unavailable and can't be enabled by the user (e.g. parental controls).
125125

126-
## Caveats
127-
128-
- The exact timings of tasks are unpredictable (depends on device sleep state
129-
etc.), and cannot be more frequent than every 15 minutes. This library
130-
should only be used for tasks that can have inexact timing, such as the
131-
periodic background syncing of data.
126+
## Limitations
127+
128+
- The exact timings of tasks are unpredictable (both iOS and Android use black-
129+
box algorithms depending on factors like device sleep state etc.), and cannot
130+
be made more frequent than every 15 minutes. This library should only be
131+
used for tasks that are an incremental feature, and can have inexact timing,
132+
such as the periodic background syncing of data, and you should be prepared
133+
for the case that background task never fires at all.
132134

133135
Android:
134136

@@ -138,8 +140,13 @@ Android:
138140

139141
iOS:
140142

141-
- iOS Background Fetch does not work in the simulator. It must be tested on a
142-
real device.
143+
- The iOS Background Fetch algorithm is a black box, and as it stands, it will
144+
not continue to run after a user manually closes the app. (The app being
145+
closed by the OS to free up memory etc. should be fine).
146+
- Background tasks will not be scheduled in the simulator. You'll need to
147+
either test it on a real device, or use the
148+
[Simulate Background Fetch](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/iOS_Simulator_Guide/TestingontheiOSSimulator/TestingontheiOSSimulator.html#//apple_ref/doc/uid/TP40012848-CH4-SW5)
149+
feature of Xcode.
143150
- The user can disable Background App Refresh for your app from their Settings
144151
(use `statusAsync()` to check for this).
145152

0 commit comments

Comments
 (0)