arrow-left
All pages
gitbookPowered by GitBook
1 of 1

Loading...

Home location

hashtag
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];

...

hashtag
Set home location listener

where ClassTest is conform to protocol GUHomeLocationListener:

hashtag
Remove home location listener

hashtag
Get home location listeners

hashtag
Remove home location listeners

//importing the framework
import GeoUniq

...

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

...
//importing the framework
#import "GeoUniq/GeoUniq-Swift.h"
...

[[GeoUniq sharedInstance] setHomeLocationListenerWithListener:[ClassTest class]];

...
/**
 *  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) -> ()
}
//importing the framework
import GeoUniq

...

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

...
//importing the framework
#import "GeoUniq/GeoUniq-Swift.h"
...

[[GeoUniq sharedInstance] removeHomeLocationListenerWithListener:[ClassTest class]];

...
//importing the framework
import GeoUniq

...

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

...
//importing the framework
#import "GeoUniq/GeoUniq-Swift.h"
...

NSArray *listeners = [[GeoUniq sharedInstance] getHomeLocationListeners];

...
//importing the framework
import GeoUniq

...

GeoUniq.sharedInstance().removeHomeLocationListeners()

...
//importing the framework
#import "GeoUniq/GeoUniq-Swift.h"
...

[[GeoUniq sharedInstance] removeHomeLocationListeners];

...