...
Create an instance of
NMApiCredentials
with mandatory parameters (account ID, password, email ID, service ID) with one of the methods provided.Call the
- + (void)obtainApiKeyWithCredentials:completion:
method, to request a new API Key. A result is expected to come in the completion block.
...
Code Block | ||
---|---|---|
| ||
NMApiCredentials *credentials = [NMApiCredentials alloc] initWithAccountId:@"yourAccountId" emailId:@"yourEmail" password:@"yourPAssword" serviceId:@(1234); [navmiiSDKNMSdk obtainApiKeyWithCredentials:credentials completion:^(NSString * _Nullable apiKey) { // Store the received API key securely // Next time pass the key to the SDK via // [navmiiSDK setApiKey:apiKey]; }]; }); |
...