IALocationManager Class Reference

Inherits from NSObject
Declared in IALocationManager.h

Overview

The IALocationManager class is central point for configuring the delivery of indoor location related events to your app. You use and instance of this class to establish the parameters that determine when location events should be delivered and to start and stop the actual delivery of those events. You can also use a location manager object to retrieve the most recent location data. The shared instance, property changes and methods of this class must be called from the application main thread only

Other Methods

  calibration

The latest calibration quality value (Deprecated: Deprecated since SDK 3.0)

@property (nonatomic, readonly) enum ia_calibration calibration

Parameters

calibration

See possible values at ia_calibration

Declared In

IALocationManager.h

  location

The latest location update.

@property (nonatomic, readwrite, nullable) IALocation *location

Discussion

This property can be set for a custom location.

Declared In

IALocationManager.h

  attitude

The latest sample of device attitude.

@property (nonatomic, readwrite, nullable) IAAttitude *attitude

Declared In

IALocationManager.h

  heading

The latest sample of device heading.

@property (nonatomic, readwrite, nullable) IAHeading *heading

Declared In

IALocationManager.h

  distanceFilter

The minimum distance measured in meters that the device must move horizontally before an update event is generated. Default value is 0.7 meters. Uses CoreLocation CLLocationDistance.

@property (assign, nonatomic) CLLocationDistance distanceFilter

Declared In

IALocationManager.h

  headingFilter

The minimum angular change in degrees required to generate new didUpdateHeading event. Default value is 1 degree.

@property (assign, nonatomic) CLLocationDegrees headingFilter

Declared In

IALocationManager.h

  attitudeFilter

The minimum angular change in degrees required to generate new didUpdateAttitude event. Default value is 1 degree.

@property (assign, nonatomic) CLLocationDegrees attitudeFilter

Declared In

IALocationManager.h

  desiredAccuracy

The accuracy of the location data.

@property (assign, nonatomic) enum ia_location_accuracy desiredAccuracy

Parameters

desiredAccuracy

See possible values at ia_location_accuracy

Discussion

The receiver does its best to achieve the requested accuracy; however, the actual accuracy is not guaranteed. You should assign a value to this property that is appropriate for your usage scenario. Determining a location with greater accuracy requires more time and more power.

Default value is kIALocationAccuracyBest.

Declared In

IALocationManager.h

  allowsBackgroundLocationUpdates

Explicitly enable background location updates. (iOS 9.0+ only)

@property (assign, nonatomic) BOOL allowsBackgroundLocationUpdates

Discussion

Location updates must be active when app goes to background for this flag to have effect. If you have enabled background execution in some other way, you may still receive location updates in background even if this flag is not set.

NOTE! you must also enable the Location updates background mode and include NSLocationAlwaysAndWhenInUseUsageDescription key in your app’s Info.plist file, and the user must authorize the always on background location permission in order for this flag to have any effect.

For more info, see: https://developer.apple.com/documentation/corelocation/getting_the_user_s_location/handling_location_events_in_the_background https://developer.apple.com/documentation/corelocation/cllocationmanager/1620568-allowsbackgroundlocationupdates https://developer.apple.com/documentation/corelocation/choosing_the_authorization_level_for_location_services/requesting_always_authorization

Default value is false, i.e. background location updates are not explicitly enabled

Declared In

IALocationManager.h

  monitoredGeofences

The set of (dynamic) geofences monitored by the location manager. Note that automatically monitored cloud geofences are not included.

@property (nonatomic, readonly, strong, nullable) NSArray<IAGeofence*> *monitoredGeofences

Discussion

You cannot add geofences to this property directly. Instead use the <startMonitoringGeofence:> method.

Declared In

IALocationManager.h

  extraInfo

The latest extra information dictionary.

@property (nonatomic, readonly, nullable) NSDictionary *extraInfo

Discussion

Used for debugging positioning.

Declared In

IALocationManager.h

Accessing the Delegate

  delegate

The delegate object to receive update events.

@property (nullable, nonatomic, readwrite, weak) id<IALocationManagerDelegate> delegate

Declared In

IALocationManager.h

SDK version

+ versionString

Returns SDK version string.

+ (nonnull NSString *)versionString

Discussion

The version string returned is in format “major.minor.patch”. (see: Semantic Versioning)

Declared In

IALocationManager.h

+ sharedInstance

Returns the shared instance.

+ (nonnull IALocationManager *)sharedInstance

Declared In

IALocationManager.h

– lockFloor:

Locks positioning to specified floor level

- (void)lockFloor:(int)floorNumber

Parameters

floorNumber

Floor level where the positioning is restricted

Declared In

IALocationManager.h

– unlockFloor

Unlocks positioning from locked floor. If lockFloor has not been called before, this is no-op.

- (void)unlockFloor

Declared In

IALocationManager.h

– lockIndoors:

Lock or unlock positioning indoors. Disables indoor-outdoor detection as well as GPS scanning if locked.

- (void)lockIndoors:(bool)lockIndoor

Parameters

lockIndoor

boolean value indicating whether to lock or unlock indoor positioning

Declared In

IALocationManager.h

Authenticate your session

– setApiKey:andSecret:

Set IndoorAtlas API key and secret for authentication.

- (void)setApiKey:(nonnull NSString *)key andSecret:(nonnull NSString *)secret

Parameters

key

API key used for authentication.

secret

API secret used for authentication.

Discussion

This method must be called before further requests with server requiring authentication.

Declared In

IALocationManager.h

– startUpdatingLocation

Starts the generation of updates that report the user’s current location.

- (void)startUpdatingLocation

Discussion

This method returns immediately. Calling this method causes the location manager to obtain an initial location fix (which may take several seconds) and notify your delegate by calling its <indoorLocationManager:didUpdateLocations:> method. After that, the receiver generates update events whenever there is new estimate.

Calling this method several times in succession does not automatically result in new events being generated. Calling stopUpdatingLocation in-between, however, does cause a new initial event to be sent the next time you call this method.

If you start this service and your app is suspended, the system stops the delivery of events until your app starts running again (only in foreground). If your app is terminated, the delivery of new location events stops altogether.

Declared In

IALocationManager.h

– stopUpdatingLocation

Stops the generation of location updates.

- (void)stopUpdatingLocation

Discussion

Call this method whenever your code no longer needs to receive location-related events. Disabling event delivery gives the receiver the option of disabling the appropriate hardware (and thereby saving power) when no clients need location data. You can always restart the generation of location updates by calling the startUpdatingLocation method again.

Declared In

IALocationManager.h

– startMonitoringForGeofence:

Starts monitoring the specified geofence. Note that cloud geofences are monitored automatically.

- (void)startMonitoringForGeofence:(nonnull IAGeofence *)geofence

Parameters

geofence

The geofence object that defines the boundary to monitor.

Discussion

You must call this method once for each geofence you want to monitor. If an existing geofence with the same identifier is already being monitored by the app, the old geofence is replaced by the new one. Geofence events are delivered as regions to the <indoorLocationManager:didEnterRegion:> and <indoorLocationManager:didExitRegion:> methods of your delegate.

Declared In

IALocationManager.h

– stopMonitoringForGeofence:

Stops monitoring the specified geofence.

- (void)stopMonitoringForGeofence:(nonnull IAGeofence *)geofence

Parameters

geofence

The geofence object currently being monitored.

Discussion

If the specified geofence object is not currently being monitored, this method has no effect.

Declared In

IALocationManager.h

– startMonitoringForWayfinding:

Start monitoring for wayfinding updates. Calling this method causes the location manager to obtain a route from user’s current location to destination defined in parameter “request” (this may take several seconds). Calling this method notify your delegate by calling its <indoorLocationManager:didUpdateRoute:> method. After that, the receiver generates update events whenever the route changes.

- (void)startMonitoringForWayfinding:(nonnull IAWayfindingRequest *)request

Parameters

request

An IAWayfindingRequest specifying the type of wayfinding updates to monitor.

Discussion

Calling this method several times in succession overwrites the previously done requests. Calling stopUpdatingLocation in-between, however, does cause a new initial event to be sent the next time you call this method.

Declared In

IALocationManager.h

– stopMonitoringForWayfinding

Stops monitoring for wayfinding updates.

- (void)stopMonitoringForWayfinding

Discussion

Call this method whenever your code no longer needs to receive wayfinding route update events. You can always restart the generation of wayfinding route updates by calling the method again.

Declared In

IALocationManager.h

– init

Marks init method as deprecated. @deprecated

- (_Nullable id)init

Declared In

IALocationManager.h