SYContext Class Reference

Use this interface to set mandatory authentication credentials You have to set authentication credentials (Api key and App Secret code) in order to use the APIs contained within this SDK. Some APIs may appear to work without valid credentials but they may stop functioning in the near future when server side configurations change, so please obtain and use valid credentials. More...

#import <SYContext.h>

Inheritance diagram for SYContext:
Collaboration diagram for SYContext:

Class Methods

(void) + initWithAppKey:appSecret:onlineRoutingKey:completion:
 Initializes Sygic SDK, must be called before any other sdk calls. More...
 
(void) + registerSharedInstanceClass:
 
(void) + initWithConfiguration:completion:
 Initializes Sygic SDK, must be called before any other sdk calls. More...
 
(void) + terminate
 Terminates Sygic SDK. More...
 
(BOOL) + isInitialized
 Check if Sygic SDK is initialized. More...
 
(nonnull NSString *) + sdkVersion
 

Detailed Description

Use this interface to set mandatory authentication credentials You have to set authentication credentials (Api key and App Secret code) in order to use the APIs contained within this SDK. Some APIs may appear to work without valid credentials but they may stop functioning in the near future when server side configurations change, so please obtain and use valid credentials.

Method Documentation

+ (void) initWithAppKey: (nonnull NSString *)  appKey
appSecret: (nonnull NSString *)  appSecret
onlineRoutingKey: (nonnull NSString *)  onlineRoutingKey
completion: (nullable void(^)(SYContexInitResult result))  completion 

Initializes Sygic SDK, must be called before any other sdk calls.

Parameters
appKeyApplication Key
appSecretApplication Secret code
onlineRoutingKeyOnline routing service key
completionInitialization completion block Sets the mandatory Sygic Authentication Credentials and License Key.

These credentials MUST be set once before attempting to use any other APIs in the Sygic SDK. You may only call this method once. It is recommended to call this method in [UIApplicationDelegate didFinishLaunchingWithOptions].

+ (void) initWithConfiguration: (nonnull NSDictionary *)  configuration
completion: (nullable void(^)(SYContexInitResult result))  completion 

Initializes Sygic SDK, must be called before any other sdk calls.

Parameters
configurationConfiguration data, you can find complete configuration scheme here .... Simple example: NSDictionary* config ="Authentication": @"app_key" : @"your-app-key", @"app_secret" : @"your-app-secret"}, @"Online": @"Routing": @"url" : @"https://directions.api.sygic.com/v2/api/directions", @"api_key": @"your-routing-key"}}

};

Parameters
completionInitialization completion block

These credentials MUST be set once before attempting to use any other APIs in the Sygic SDK. You may only call this method once. It is recommended to call this method in [UIApplicationDelegate didFinishLaunchingWithOptions].

+ (BOOL) isInitialized

Check if Sygic SDK is initialized.

Returns
YES if Sygic SDK is initialized, otherwise NO. If NO is returned then the Sygic SDK is not ready to handle any service.
+ (void) registerSharedInstanceClass: (Class)  c

Provided by category SYContext(SharedInstances).

+ (nonnull NSString*) sdkVersion

SDK version in format MAJOR.MINOR.PATCH.

+ (void) terminate

Terminates Sygic SDK.


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