Extends Protocol: |
|
Declared In: |
|
See: |
|
Introduction
Interface for VocService delegate.
Discussion
VocServiceDelegate provides various methods to notify of various changes in VocService. All method calls happen on delegate queue.
Methods
- -vocService:didBecomeNotRegistered:
Invoked when VocService transtions to not registered state.
- -vocService:didFailToRegister:
Invoked when VocService registerWithLicense: is called and registering fails.
- -vocService:didInitialize:
Invoked when VocService has finished initialization.
- -vocService:didReceiveChallengeForRequest:currentRequest:challenge:modifiedTrust:completion:
Invoked when MAP SDK receives a server trust challenge.
- -vocService:didRegister:
Invoked when VocService registerWithLicense: is called and registration succeeds.
- -vocService:networkQualityUpdate:
This method will be invoked to signal a change in network quality.
Invoked when VocService transtions to not registered state.
@optional
- (void) vocService:(nonnull id<VocService>)vocService
didBecomeNotRegistered:(nonnull NSDictionary *)info;
Discussion
This is not called initially when the service is started in not registered state. When the service is in registered state it may be notified by Voc server that the user is no longer valid user and then VocService will transition to not registered state and invoke this method.
See
Invoked when VocService registerWithLicense: is called and registering fails.
@optional
- (void) vocService:(nonnull id<VocService>)vocService
didFailToRegister:(nonnull NSError *)error;
Parameters
-
vocService
An instance of VocService.
-
error
Error details for registration failure.
Discussion
Registration can fail for various reasons, like not network or bad license, etc. When this happens the completion passed in registerWithLicense: will be called and after that this delegate method will be called.
See
Invoked when VocService has finished initialization.
@optional
- (void) vocService:(nonnull id<VocService>)vocService
didInitialize:(nonnull NSDictionary *)info;
Parameters
-
vocService
An instance of VocService.
-
info
More information on successful registration.
Discussion
This delegate method will be called when the VocService has finished initialization. This indicates the SDK is ready for processing requests.
See
Invoked when MAP SDK receives a server trust challenge.
@optional
- (void) vocService:(nonnull id<VocService>)vocService
didReceiveChallengeForRequest:(nonnull NSURLRequest *)originalRequest
currentRequest:(nonnull NSURLRequest *)currentRequest
challenge:(nonnull NSURLAuthenticationChallenge *)challenge
modifiedTrust:(nullable SecTrustRef) modifiedTrust completion:(nonnull void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completion;
Parameters
-
originalRequest
The request made by your app. Its hostname should match the 'modifiedTrust'.
-
currentRequest
A modified request made by the SDK. This may have its hostname resolved to an IP address.
-
challenge
The server trust challenge. The protectionSpace hostname and serverTrust object may have their hostnames resolved to an IP address. For this reason, use 'modifiedTrust' when performing trust checks instead of 'challenge.protectionSpace.serverTrust'.
-
modifiedTrust
A copy of 'challenge.protectionSpace.serverTrust' using the server's hostname instead of its IP address. This is the correct trust object to use for server trust checks, pinned certificate comparisons, etc.
-
completion
A block indicating whether the SDK should proceed with or cancel the request. Its parameters follow the same rules as NSURLSession::didReceiveChallenge.
Discussion
This optional method allows the app to approve or disallow connections when posed a server trust challenge. If this callback is not implemented, the SDK will perform default trust handling (i.e., using trusted authorities on the device).
This may be called multiple times for a single URL request in the case of multipath HTTP/SR4C.:
'modifiedTrust' is released at the end of this call. To use it beyond this method call, it must be retained and released when done.:
Invoked when VocService registerWithLicense: is called and registration succeeds.
@optional
- (void) vocService:(nonnull id<VocService>)vocService
didRegister:(nonnull NSDictionary* )info;
Parameters
-
vocService
An instance of VocService.
-
info
More information on successful registration.
Discussion
When registration succeeds the completion passed in registerWithLicense: will be called and after that this delegate method will be called.
See
This method will be invoked to signal a change in network quality.
@optional
- (void) vocService:(nonnull id<VocService>)vocService
networkQualityUpdate:(nonnull id<VocNetworkQuality>)networkQuality;
Parameters
-
vocService
An instance of VocService.
-
networkQuality
An instance of VocNetworkQuality.
Discussion
This method will receive the results of the latest network quality check.
Last Updated: Tuesday, April 16, 2019
|