Loading...
Searching...
No Matches

Provides access to all services in the SDK. More...

#include <com/navigine/idl/objc/NCNavigineSdk.h>

Inherits NSObject.

Instance Methods

(void) - setUserHash:
 Method is used to set USER_HASH from the user's profile in CMS.
 
(void) - setServer:
 Method is used to set server url.
 
(nullable NCLocationManager *) - getLocationManager
 LocationManager instance, which could be used for working with the Location.
 
(nullable NCNavigationManager *) - getNavigationManager:
 NavigationManager instance, which could be used for working with the NCPosition.
 
(nullable NCZoneManager *) - getZoneManager:
 ZoneManager instance, which could be used for working with zones and detecting enter and leave events. Zone
 
(nullable NCRouteManager *) - getRouteManager:navigationManager:
 RouteManager instance, which could be used for working making routes, setting target points. RoutePath
 
(nullable NCAsyncRouteManager *) - getAsyncRouteManager:navigationManager:
 AsyncRouteManager instance, which could be used for working with routing sessions. RouteSession
 
(nullable NCNotificationManager *) - getNotificationManager:
 NotificationManager instance, which could be used for working with notifications when detecting beacons. Notification
 
(nullable NCMeasurementManager *) - getMeasurementManager:
 MeasurementManager instance, which could be used for managing measurement generators and handling sensor and signal measurements.
 
(nullable NCLocationListManager *) - getLocationListManager
 
(nullable NCStorageManager *) - getStorageManager
 
(nullable NCUserLocationLayer *) - getUserLocationLayer:
 

Class Methods

(nullable NCNavigineSdk *) + getInstance
 Method initializes Navigation library and returns NavigineSdk instance.
 
(nonnull NSString *) + getVersion
 Method returns NavigineSdk SDK Version.
 
(nonnull NSString *) + getDeviceId
 Method returns persistent device id.
 
(int64_t) + getRelativeTime
 Method returns current timestamp.
 

Detailed Description

Provides access to all services in the SDK.

Class contains a list of static functions for initializing library and list of functions for getting access to the managers, each of which will provide different opportunities for working with SDK

Note
SDK holds objects by weak references. You need to have strong references to them somewhere in the client code.

Definition at line 39 of file NCNavigineSdk.h.

Method Documentation

◆ getAsyncRouteManager:navigationManager:

- (nullable NCAsyncRouteManager *) getAsyncRouteManager: (nullable NCLocationManager *) locationManager
navigationManager: (nullable NCNavigationManager *) navigationManager 

AsyncRouteManager instance, which could be used for working with routing sessions. RouteSession

Parameters
locationManagerLocationManager instance
navigationManagerNavigationManager instance
Returns
AsyncRouteManager instance

Swift code snippet:

// Get AsyncRouteManager for async route operations
if let locationManager = locationManager,
let navigationManager = navigationManager {
asyncRouteManager = sdk.getAsyncRouteManager(locationManager, navigationManager: navigationManager)
if asyncRouteManager != nil {
print("AsyncRouteManager successfully initialized")
}
}

Objective C code snippet:

// Get AsyncRouteManager for async route operations
if (self.locationManager && self.navigationManager) {
self.asyncRouteManager = [self.sdk getAsyncRouteManager:self.locationManager
navigationManager:self.navigationManager];
if (self.asyncRouteManager) {
NSLog(@"AsyncRouteManager successfully initialized");
}
}

◆ getDeviceId

+ (nonnull NSString *) getDeviceId

Method returns persistent device id.

Returns
persistent device id

Swift code snippet:

// Get device ID
print("Device ID: \‍(NCNavigineSdk.getDeviceId())")

Objective C code snippet:

// Get device ID
NSLog(@"Device ID: %@", [NCNavigineSdk getDeviceId]);

◆ getInstance

+ (nullable NCNavigineSdk *) getInstance

Method initializes Navigation library and returns NavigineSdk instance.

Returns
instance of SDK

Swift code snippet:

// Get SDK instance
sdk = NCNavigineSdk.getInstance()

Objective C code snippet:

// Get SDK instance
self.sdk = [NCNavigineSdk getInstance];

◆ getLocationListManager

- (nullable NCLocationListManager *) getLocationListManager

Returns a manager that allows to manage locations list

Returns
Location list manager instance LocationListManager

Swift code snippet:

// Get LocationListManager for location list operations
locationListManager = sdk.getLocationListManager()
if locationListManager != nil {
print("LocationListManager successfully initialized")
}

Objective C code snippet:

// Get LocationListManager for location list operations
self.locationListManager = [self.sdk getLocationListManager];
if (self.locationListManager) {
NSLog(@"LocationListManager successfully initialized");
}

◆ getLocationManager

- (nullable NCLocationManager *) getLocationManager

LocationManager instance, which could be used for working with the Location.

Returns
LocationManager instance

Swift code snippet:

// Get LocationManager for working with locations
locationManager = sdk.getLocationManager()
if locationManager != nil {
print("LocationManager successfully initialized")
}

Objective C code snippet:

// Get LocationManager for working with locations
self.locationManager = [self.sdk getLocationManager];
if (self.locationManager) {
NSLog(@"LocationManager successfully initialized");
}

◆ getMeasurementManager:

- (nullable NCMeasurementManager *) getMeasurementManager: (nullable NCLocationManager *) locationManager

MeasurementManager instance, which could be used for managing measurement generators and handling sensor and signal measurements.

Parameters
locationManagerLocationManager instance
Returns
MeasurementManager instance

Swift code snippet:

// Get MeasurementManager for measurements
if let locationManager = locationManager {
measurementManager = sdk.getMeasurementManager(locationManager)
if measurementManager != nil {
print("MeasurementManager successfully initialized")
}
}

Objective C code snippet:

// Get MeasurementManager for measurements
if (self.locationManager) {
self.measurementManager = [self.sdk getMeasurementManager:self.locationManager];
if (self.measurementManager) {
NSLog(@"MeasurementManager successfully initialized");
}
}

◆ getNavigationManager:

- (nullable NCNavigationManager *) getNavigationManager: (nullable NCLocationManager *) locationManager

NavigationManager instance, which could be used for working with the NCPosition.

Parameters
locationManagerLocationManager instance
Returns
NavigationManager instance

Swift code snippet:

// Get NavigationManager for navigation
if let locationManager = locationManager {
navigationManager = sdk.getNavigationManager(locationManager)
if navigationManager != nil {
print("NavigationManager successfully initialized")
}
}

Objective C code snippet:

// Get NavigationManager for navigation
if (self.locationManager) {
self.navigationManager = [self.sdk getNavigationManager:self.locationManager];
if (self.navigationManager) {
NSLog(@"NavigationManager successfully initialized");
}
}

◆ getNotificationManager:

- (nullable NCNotificationManager *) getNotificationManager: (nullable NCLocationManager *) locationManager

NotificationManager instance, which could be used for working with notifications when detecting beacons. Notification

Parameters
locationManagerLocationManager instance
Returns
NotificationManager instance

Swift code snippet:

// Get NotificationManager for notifications
if let locationManager = locationManager {
notificationManager = sdk.getNotificationManager(locationManager)
if notificationManager != nil {
print("NotificationManager successfully initialized")
}
}

Objective C code snippet:

// Get NotificationManager for notifications
if (self.locationManager) {
self.notificationManager = [self.sdk getNotificationManager:self.locationManager];
if (self.notificationManager) {
NSLog(@"NotificationManager successfully initialized");
}
}

◆ getRelativeTime

+ (int64_t) getRelativeTime

Method returns current timestamp.

Returns
internal timestamp

Swift code snippet:

// Get relative time
print("Relative Time: \‍(NCNavigineSdk.getRelativeTime())")

Objective C code snippet:

// Get relative time
NSLog(@"Relative Time: %lld", [NCNavigineSdk getRelativeTime]);

◆ getRouteManager:navigationManager:

- (nullable NCRouteManager *) getRouteManager: (nullable NCLocationManager *) locationManager
navigationManager: (nullable NCNavigationManager *) navigationManager 

RouteManager instance, which could be used for working making routes, setting target points. RoutePath

Parameters
locationManagerLocationManager instance
navigationManagerNavigationManager instance
Returns
RouteManager instance

Swift code snippet:

// Get RouteManager for building routes
if let locationManager = locationManager,
let navigationManager = navigationManager {
routeManager = sdk.getRouteManager(locationManager, navigationManager: navigationManager)
if routeManager != nil {
print("RouteManager successfully initialized")
}
}

Objective C code snippet:

// Get RouteManager for building routes
if (self.locationManager && self.navigationManager) {
self.routeManager = [self.sdk getRouteManager:self.locationManager
navigationManager:self.navigationManager];
if (self.routeManager) {
NSLog(@"RouteManager successfully initialized");
}
}

◆ getStorageManager

- (nullable NCStorageManager *) getStorageManager

Returns a manager that allows to manage user storages

Returns
Storage manager instance StorageManager

Swift code snippet:

// Get StorageManager for working with storages
storageManager = sdk.getStorageManager()
if storageManager != nil {
print("StorageManager successfully initialized")
}

Objective C code snippet:

// Get StorageManager for working with storages
self.storageManager = [self.sdk getStorageManager];
if (self.storageManager) {
NSLog(@"StorageManager successfully initialized");
}

◆ getUserLocationLayer:

- (nullable NCUserLocationLayer *) getUserLocationLayer: (nullable NCLocationWindow *) locationWindow

Create layer with the user location icon.

◆ getVersion

+ (nonnull NSString *) getVersion

Method returns NavigineSdk SDK Version.

Returns
version of SDK

Swift code snippet:

// Get SDK version
print("Navigine SDK Version: \‍(NCNavigineSdk.getVersion())")

Objective C code snippet:

// Get SDK version
NSLog(@"Navigine SDK Version: %@", [NCNavigineSdk getVersion]);

◆ getZoneManager:

- (nullable NCZoneManager *) getZoneManager: (nullable NCNavigationManager *) navigationManager

ZoneManager instance, which could be used for working with zones and detecting enter and leave events. Zone

Parameters
navigationManagerNavigationManager instance
Returns
ZoneManager instance

Swift code snippet:

// Get ZoneManager for working with zones
if let navigationManager = navigationManager {
zoneManager = sdk.getZoneManager(navigationManager)
if zoneManager != nil {
print("ZoneManager successfully initialized")
}
}

Objective C code snippet:

// Get ZoneManager for working with zones
if (self.navigationManager) {
self.zoneManager = [self.sdk getZoneManager:self.navigationManager];
if (self.zoneManager) {
NSLog(@"ZoneManager successfully initialized");
}
}

◆ setServer:

- (void) setServer: (nonnull NSString *) server

Method is used to set server url.

Parameters
servercustom server url in format: http[s]://example.com

Swift code snippet:

// Set server URL (optional)
sdk.setServer("https://custom.navigine.com")

Objective C code snippet:

// Set server URL (optional)
[self.sdk setServer:@"https://custom.navigine.com"];

◆ setUserHash:

- (void) setUserHash: (nonnull NSString *) userHash

Method is used to set USER_HASH from the user's profile in CMS.

Parameters
userHashauth token in format XXXX-XXXX-XXXX-XXXX

Swift code snippet:

// Set user hash (authorization token)
sdk.setUserHash("XXXX-XXXX-XXXX-XXXX")

Objective C code snippet:

// Set user hash (authorization token)
[self.sdk setUserHash:@"XXXX-XXXX-XXXX-XXXX"];

The documentation for this class was generated from the following file: