Skip to content

Commit 6dbbc04

Browse files
committed
README.md updates
1 parent 0264e92 commit 6dbbc04

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

IFTTT SDK/LocationEvent.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import Foundation
99

10+
/// Descibes a closure that is invoked whenever the SDK generates a `[LocationEvent]`
1011
public typealias LocationEventsClosure = ([LocationEvent]) -> Void
1112

1213
/// Describes the kinds of region events that can be reported.

Location.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ The SDK supports toggling geofences on and off for a given connection. To toggle
8585
### Background process execution
8686
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.
8787
88+
### Event Reporting
89+
The SDK broadcasts location events via the `ConnectButtonController.setLocationEventReportedClosure`. This closure gets invoked for the following events:
90+
91+
- Region event(s) (exit and enter) gets recorded by the SDK.
92+
- Region event(s) started uploaded by the SDK.
93+
- Region event(s) successfully uploaded by the SDK.
94+
- Region event(s) failed in uploading by the SDK.
95+
96+
See `LocationEvent.swift` for detailed information on the events that are reported as well as the data associated with those events.
97+
8898
### Notes
8999
- 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.
90100
- The SDK runs a synchronization by default for the following events:

0 commit comments

Comments
 (0)