Mappls API Core
Introduction
This SDK provides core features for authentication and access for various Mappls's SDKs in a very simple way. The preferred way of integrating the SDK can be found in the below.
Authentication
To initialize and authenticate any Mappls's SDK, it is required to set keys (provided by Mappls) in MapplsAPICore
through MapplsAccountManager
or Info.plist
.
Mappls's Keys can be get from here which is governed by the API terms and conditions.
MapplsAccountManager
You can set required keys using class MapplsAccountManager
.
To access
MapplsAccountManager
addition to import statement forMapplsAPICore
is required.Objective C
#import <MapplsAPICore/MapplsAPICore.h>
Swift
import MapplsAPICore
Use below methods of
MapplsAccountManager
to set different keys as follows.Objective C
[MapplsAccountManager setMapSDKKey:@"MAP_SDK_KEY"];
[MapplsAccountManager setRestAPIKey:@"REST_API_KEY"];
[MapplsAccountManager setClientId:@"CLIENT_ID"];
[MapplsAccountManager setClientSecret:@"CLIENT_SECRET"];
[MapplsAccountManager setGrantType:@"client_credentials"]; //optionalSwift
MapplsAccountManager.setMapSDKKey("MAP_SDK_KEY")
MapplsAccountManager.setRestAPIKey("REST_API_KEY")
MapplsAccountManager.setClientId("CLIENT_ID")
MapplsAccountManager.setClientSecret("CLIENT_SECRET")
MapplsAccountManager.setGrantType("client_credentials") //optionalNote: Add the above to your's application's initialization i.e
application:didFinishLaunchingWithOptions
method of AppDelegate
Info Plist
You can set required Mappls's keys by application's `Info.plist`.
To set different Mappls's keys add different keys in `Info.plist` and set value against each key.
Below are different keys which can be added in `Info.plist`.
- `MapplsSDKKey`
- `MapplsRestKey`
- `MapplsClientId`
- `MapplsClientSecret`
- `MapplsGrantType`