IAGSManager

@objcMembers
public class IAGSManager : NSObject
extension IAGSManager: IALocationManagerDelegate

GroundSage Service API

Public

  • The latest location update.

    Declaration

    Swift

    public var location: IALocation? { get set }
  • The latest sample of device attitude.

    Declaration

    Swift

    public var attitude: IAAttitude? { get }
  • The latest sample of device heading.

    Declaration

    Swift

    public var heading: IAHeading? { get }
  • The minimum angular change in degrees required to generate new didUpdateAttitude event. Default value is 1 degree.

    Declaration

    Swift

    public var attitudeFilter: CLLocationDegrees { get set }
  • The minimum angular change in degrees required to generate new didUpdateHeading event. Default value is 1 degree.

    Declaration

    Swift

    public var headingFilter: CLLocationDegrees { get set }
  • The set of (dynamic) geofences monitored by the location manager. Note that automatically monitored cloud geofences are not included.

    You cannot add geofences to this property directly. Instead use the IAGSManager.startMonitoring(for:) method.

    Declaration

    Swift

    public var monitoredGeofences: [IAGeofence]? { get }
  • The latest extra information dictionary.

    Used for debugging positioning.

    Declaration

    Swift

    public var extraInfo: [AnyHashable : Any]? { get }
  • The shared singleton session object.

    To get started, you must set API key and secret key to SDK. You can either add a key IAGSApiKey and IAGSSecretKey to plist, or write the following codes:

    IAGSManager.shared.setApiKey("SET YOUR API KEY HERE", andSecret: "SET YOUR SECRET KEY HERE")
    

    Declaration

    Swift

    @objc(sharedManager)
    public static let shared: IAGSManager
  • Set your API key and Secret key for SDK, this must be same as IndoorAtlas provided keys

    Declaration

    Swift

    public func setApiKey(_ apiKey: String, andSecret apiSecret: String)

    Parameters

    apiKey

    API key for access the service

    andSecret

    API secret key for access the service

  • Add delegate to GroundSage instances

    Declaration

    Swift

    public func addGroundSageDelegate(_ delegate: IAGSManagerDelegate)

    Parameters

    delegate

    The delegate object to receive update events.

  • Remove delegate from GroundSage instances

    Declaration

    Swift

    public func removeGroundSageDelegate(_ delegate: IAGSManagerDelegate)

    Parameters

    delegate

    The delegate object to receive update events.

  • Start to subscribe the service. SDK will broadcast an event when user entered the specified region.

    Throws

    Throw error if API key not set

    Declaration

    Swift

    public func startSubscription()
  • Stop to subscribe the service

    Declaration

    Swift

    public func stopSubscription()
  • Request venue information from server

    Throws

    Throw error if API key not set

    Declaration

    Swift

    public func requestVenueInfo(completionHandler: @escaping (_ venueInfo: [IAGSVenue]?, _ error: Error?) -> Void)

    Parameters

    completionHandler

    A closure which is called with map detail and error if any

    venueInfo

    Venue information if error is nil

    error

    Error response from server

  • Add IALocationManagerDelegate to receive broadcast event

    Declaration

    Swift

    public func addLocationManagerDelegate(_ delegate: IALocationManagerDelegate)

    Parameters

    delegate

    The delegate object to receive update events.

  • Remove IALocationManagerDelegate from GroundSage instances

    Declaration

    Swift

    public func removeLocationManagerDelegate(_ delegate: IALocationManagerDelegate)

    Parameters

    delegate

    The delegate object to receive update events.

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

    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.

    Declaration

    Swift

    @objc(startMonitoringForGeofence:)
    public func startMonitoring(for geofence: IAGeofence)

    Parameters

    for

    The geofence object that defines the boundary to monitor.

  • Stops IALocationManager monitoring the specified geofence.

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

    Declaration

    Swift

    @objc(stopMonitoringForGeofence:)
    public func stopMonitoring(for geofence: IAGeofence)

    Parameters

    forGeofence

    The geofence object currently being monitored.

  • Start IALocationManager 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.

    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.

    Declaration

    Swift

    public func startMonitoring(forWayfinding: IALatLngFloorCompatible)

    Parameters

    forWayfinding

    An IALatLngFloorCompatible object specifying the wayfinding destination

  • Stops IALocationManager monitoring for wayfinding updates.

    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 startMonitoring(forWayfinding:) method again.

    Declaration

    Swift

    public func stopMonitoringForWayfinding()
  • Request a single-shot wayfinding route. Callback with route result is called from the application main thread.

    Declaration

    Swift

    public func requestWayfindingRouteFrom(from: IALatLngFloorCompatible, to: IALatLngFloorCompatible, callback: @escaping (_ route: IARoute) -> Void)

    Parameters

    from

    Wayfinding starting location

    to

    Wayfinding destination

    callback

    a callback to provide route to

    route

    a route from user’s location to destination.