SPGeofence
Objective-C
@interface SPGeofence : SPGeofenceInfo
Swift
class SPGeofence : SPGeofenceInfo
Extends SPGeofenceInfo with some more common information required by geofences. Does not contain geometry information.
-
Sets time when geofence should expire and disappear. By default geofences disappear when application is restarted.
Declaration
Objective-C
- (void)setExpirationDate:(nonnull NSDate *)date;Swift
func setExpirationDate(_ date: Date)Parameters
dateexpiration date for geofence
-
Time delay after a ‘dwell’ transition should happen after entry/exit to geofence.
Declaration
Objective-C
- (void)setLoiteringDelay:(NSTimeInterval)seconds;Swift
func setLoiteringDelay(_ seconds: TimeInterval)Parameters
secondsamount of seconds after a ‘dwell’ event will be triggered.
-
Set which types of transition callbacks you want to receive from the geofence. Enter and exit notifications are enabled by default.
Declaration
Objective-C
- (void)setTransitionTypes:(SPGeofenceTransitionOptions)transitions;Swift
func setTransitionTypes(_ transitions: SPGeofenceTransitionOptions)Parameters
transitionstypes of transitions that geofence should listen to.
-
Declaration
Objective-C
- (SPGeofenceTransitionOptions)transitions;Swift
func transitions() -> SPGeofenceTransitionOptionsReturn Value
transition types for geofence.
-
Declaration
Objective-C
- (NSTimeInterval)loiteringDelay;Swift
func loiteringDelay() -> TimeIntervalReturn Value
time delay between before triggering ‘dwell’ type transitions
-
Declaration
Objective-C
- (NSTimeInterval)expirationTime;Swift
func expirationTime() -> TimeIntervalReturn Value
utc timestamp when geofence will disappear
SPGeofence Class Reference