Home location
Get home location
//importing the framework
import GeoUniq
...
let home: GUHomeLocation? = GeoUniq.sharedInstance().getHomeLocation()
...
//importing the framework
#import "GeoUniq/GeoUniq-Swift.h"
...
GUHomeLocation* home = [[GeoUniq sharedInstance] getHomeLocation];
...
Set home location listener
//importing the framework
import GeoUniq
...
GeoUniq.sharedInstance().setHomeLocationListener(listener: ClassTest)
...
//importing the framework
#import "GeoUniq/GeoUniq-Swift.h"
...
[[GeoUniq sharedInstance] setHomeLocationListenerWithListener:[ClassTest class]];
...
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)
...
//importing the framework
#import "GeoUniq/GeoUniq-Swift.h"
...
[[GeoUniq sharedInstance] removeHomeLocationListenerWithListener:[ClassTest class]];
...
Get home location listeners
//importing the framework
import GeoUniq
...
let homeLocationListeners: [GUHomeLocation]? = GeoUniq.sharedInstance().getHomeLocationListeners()
...
//importing the framework
#import "GeoUniq/GeoUniq-Swift.h"
...
NSArray *listeners = [[GeoUniq sharedInstance] getHomeLocationListeners];
...
Remove home location listeners
//importing the framework
import GeoUniq
...
GeoUniq.sharedInstance().removeHomeLocationListeners()
...
//importing the framework
#import "GeoUniq/GeoUniq-Swift.h"
...
[[GeoUniq sharedInstance] removeHomeLocationListeners];
...
Last updated