Home location

Get home location

//importing the framework
import GeoUniq

...

let home: GUHomeLocation? = GeoUniq.sharedInstance().getHomeLocation()

...

Set home location listener

//importing the framework
import GeoUniq

...

GeoUniq.sharedInstance().setHomeLocationListener(listener: ClassTest)

...

where ClassTest is conform to protocol GUHomeLocationListener:

/**
 *  Delegate to implement in order to receive callbacks for the home location updates
 */
@objc public protocol GUHomeLocationListener {
	
	/**
	 Public constructor
	 */
	@objc init()
	
	/**
	 Called when a new home location is detected
	 
	 - parameter GUHomeLocation: Home location detected
	 */
	@objc func onNewHomeLocationDetected(home: GUHomeLocation) -> ()
}

Remove home location listener

//importing the framework
import GeoUniq

...

GeoUniq.sharedInstance().removeHomeLocationListener(listener: ClassTest)

...

Get home location listeners

//importing the framework
import GeoUniq

...

let homeLocationListeners: [GUHomeLocation]? = GeoUniq.sharedInstance().getHomeLocationListeners()

...

Remove home location listeners

//importing the framework
import GeoUniq

...

GeoUniq.sharedInstance().removeHomeLocationListeners()

...

Last updated