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
/// Allows for a closure to be executed when the OS starts a background process set up by the SDK.
158
+
///
159
+
/// The `launchHandler` parameter will get run on a background thread. `expirationHandler` gets called by the system right before the amount of allotted time for the background process is zero. Use the `expirationHandler` to perform any cleanup of resources used or allocated in `launchHandler`. `expirationHandler` will be executed on the same background thread as `launchHandler`.
160
+
///
161
+
/// - Parameters:
162
+
/// - launchHandler: A closure to execute when the OS starts a background process set up by the SDK.
163
+
/// - expirationHandler: A closure to execute when the allotted time for the background process is zero.
Copy file name to clipboardExpand all lines: Location.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,9 @@ The SDK doesn't directly invoke any background fetch methods. To use background
82
82
### Geofence Toggling
83
83
The SDK supports toggling geofences on and off for a given connection. To toggle geofences for a connection, call `ConnectButtonController.setGeofencesEnabled(enabled:for:)`.
84
84
85
+
### Background process execution
86
+
To set closures to run when a SDK-defined background process runs, call `ConnectButtonController.setBackgroundProcessClosures(launchHandler:expirationHandler)`. The `launchHandler` parameter is the closure that's executed when a background process starts. The `expirationHandler` parameter is the closure that's executed when the background process is about to be ended by the system.
87
+
85
88
### Notes
86
89
- Automatic synchronization for a given connection will only be run if the connection has location triggers. Similarly, location region monitoring will only be started if the connection has location triggers setup.
87
90
- The SDK runs a synchronization by default for the following events:
0 commit comments