SYContext Class Reference

Use this interface to set mandatory authentication credentials. You have to set authentication credentials (API key and optionally 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) + initWithConfiguration:withCompletion:
 Initializes Sygic SDK, must be called before any other SDK calls. If called more than once, behavior is undefined. It's recommended to call this method in [UIApplicationDelegate didFinishLaunchingWithOptions]. More...
 
(void) + initWithConfiguration:logConnectorDelegate:completion:
 Initializes Sygic SDK, must be called before any other SDK calls. If called more than once, behavior is undefined. It's recommended to call this method in [UIApplicationDelegate didFinishLaunchingWithOptions]. More...
 
(void) + initWithRequest:completion:
 Initializes Sygic SDK, must be called before any other SDK calls. If called more than once, behavior is undefined. It's recommended to call this method in [UIApplicationDelegate didFinishLaunchingWithOptions]. 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 optionally 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

◆ initWithConfiguration:withCompletion:

+ (void) initWithConfiguration: (nonnull NSDictionary *)  configuration
withCompletion: ("initWithConfiguration is)  deprecated
(use initWithRequest instead")  __deprecated_msg 

Initializes Sygic SDK, must be called before any other SDK calls. If called more than once, behavior is undefined. It's recommended to call this method in [UIApplicationDelegate didFinishLaunchingWithOptions].

Parameters
configurationConfiguration data, you can find complete configuration scheme here: https://www.sygic.com/developers/sygic-maps-sdk/sdk-configuration/full-json-configuration/full-json-example Simple example: NSDictionary* config ="Authentication": @"app_key" : @"your-app-key"} };
completionInitialization completion block.

◆ initWithConfiguration:logConnectorDelegate:completion:

+ (void) initWithConfiguration: (nonnull NSDictionary *)  configuration
logConnectorDelegate: (nullable id< SYLogConnectorDelegate >)  logConnectorDelegate
completion: ("initWithConfiguration is)  deprecated
(use initWithRequest instead")  __deprecated_msg 

Initializes Sygic SDK, must be called before any other SDK calls. If called more than once, behavior is undefined. It's recommended to call this method in [UIApplicationDelegate didFinishLaunchingWithOptions].

Parameters
configurationConfiguration data, you can find complete configuration scheme here: https://www.sygic.com/developers/sygic-maps-sdk/sdk-configuration/full-json-configuration/full-json-example Simple example: NSDictionary* config ="Authentication": @"app_key" : @"your-app-key"} };
logConnectorDelegateAn object implementing SYLogConnectorDelegate protocol. SDK will keep a weak reference to this object. It will be set to SYLogConnector.shared.delegate as soon as possible to provide logs during SDK initialization. Requires "Logging" key to be set properly in configuration, otherwise it will not receive messages. See SYLogConnectorDelegate for more details.
completionInitialization completion block.

◆ initWithRequest:completion:

+ (void) initWithRequest: (nonnull SYContextInitRequest *)  request
completion: (initWithRequest(_:completion:))  NS_SWIFT_NAME 

Initializes Sygic SDK, must be called before any other SDK calls. If called more than once, behavior is undefined. It's recommended to call this method in [UIApplicationDelegate didFinishLaunchingWithOptions].

Parameters
requestRequest object containing initialization configuration.
completionInitialization completion block.

◆ terminate

+ (void) terminate

Terminates Sygic SDK.

◆ isInitialized

+ (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.

◆ sdkVersion

+ (nonnull NSString*) sdkVersion

SDK version in format MAJOR.MINOR.PATCH.


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