VocConfig

Extends Protocol:
NSObject
Declared In:

Introduction

Voc service configuration.



Methods

-setBlacklist:

This method will blacklist a list of host names

-setWhitelist:

This method will whitelist a list of host names


setBlacklist:


This method will blacklist a list of host names

- (void)setBlacklist:(nullable NSArray<NSString*> *) blacklist; 
Parameters
blacklist

An array of blacklisted host name strings. Passing an empty or nil blacklist array would reset all filtering.

Ex. [akaService.config setBlacklist:@[@"www.xyz.com"]];

Discussion

The blacklisted host names will not be processed by the SDK. Calling this method will clear the whitelisted host names. If array is set multiple times, black listed host names will be overwritten.


setWhitelist:


This method will whitelist a list of host names

- (void)setWhitelist:(nullable NSArray<NSString*> *) whitelist; 
Parameters
whitelist

An array of whitelisted host name strings. Passing a nil whitelist array would reset all filtering.

Ex. [akaService.config setWhitelist:@[@"www.xyz.com"]];

Discussion

All host names other than the whitelisted host names will not be processed by the SDK. Calling this method will clear the blacklisted host names. If array is set multiple times, white listed host names will be overwritten.


Properties

addUserAgent

if Yes, add SDK generated user agent to all requests. Ex. Mozilla/5.0 (iPhone; CPU iPhone OS 11_2 like Mac OS X) AppleWebKit/604.4.7 (KHTML, like Gecko) Mobile/15C107

autoFollowRedirects

Tell URL interceptor to automatically follow HTTP/S redirects. Set YES to follow redirects and return the final response to your app. Set NO to return the 30x response to your app.

clientIngest

The client can ingest content which does not exist in server. Be default, client ingest is disabled.

dailyCellularQuota

Daily cellular quota.

dailyCellularUsed

Daily cellular data used.

dailyDownloadUsed

The sum of dailyWifiUsed and dailyCellularUsed.

dailyWifiQuota

Daily wifi quota.

dailyWifiUsed

Daily wifi data used.

delayedRegistration

Whether or not server registration happens on first download

downloadOnlyWhenCharging

If YES, downloads are only allowed when charging.

enableAutoPurge

If YES, triggers SDK purge mechanism when needed.

fileSizeMax

Files larger than this value will not be downloaded.

forceDownload

if Yes, user download request will start immediately and does not respect device policies.

foregroundContentCheckDelay

Seconds after coming to foreground to delay a check for new content.

ignoredHTTPMethods

Set a list of HTTP methods to be ignored by the SDK. These will be rejected by the SDK's NSURLProtocol handler and will pass to the next handler in line. This may be your own handler or the default system handler.

itemDownloadBehavior

This configuration will drive the download behavior of sdk provided the item download behavior is set to VOCItemDownloadSdkBehavior.

license

The license provided through configuration or registration API.

lookupServerHost

Upon user/sdk registration, the registration request will be sent to lookup server to identify the server host that manages the account.

lookupServerHostDefault

The default setting for voc lookup server.

lookupServerHostOverride

Setting for voc lookup server that overrides the default.

lowBatteryLimit

Downloads will not occur if battery level is below this limit.

maxConcurrentDownloads

Limits the number of concurrent downloads, -1 no limit.

maxLaterDownloads

Limits the number of downloads that are scheduled later, -1 no limit.

networkSelection

Access this configuration to know if downloads happen on wifi only, wifi and cellular or can be disabled all together.

networkSelectionDefault

Access this configuration to know what is the server network preference for download.

networkSelectionOverride

Allows client to controls if download needs to happen on wifi only, wifi and cellular or can be disabled all together.

serverHost

Serverhost is the one that manages the content on the device.

serverHostFromLookup

The voc server setting obtained from voc lookup.

serverHostOverride

Setting for voc server that overrides the value from lookup.

trackFileDownloadProgress

If set as NO, VocService::bytesDownloaded wont be updated.

useProductionApns

Tells voc server to use production APNS (Apple Push Notification Service) environment.

vocId

Unique id for voc service assigned during registration.


addUserAgent


if Yes, add SDK generated user agent to all requests. Ex. Mozilla/5.0 (iPhone; CPU iPhone OS 11_2 like Mac OS X) AppleWebKit/604.4.7 (KHTML, like Gecko) Mobile/15C107

@property (readwrite,
    assign,
    nonatomic) BOOL addUserAgent; 
Discussion

Default value is NO.


autoFollowRedirects


Tell URL interceptor to automatically follow HTTP/S redirects. Set YES to follow redirects and return the final response to your app. Set NO to return the 30x response to your app.

@property (readwrite,
    assign,
    nonatomic) BOOL autoFollowRedirects; 
Discussion

Defaults to YES.


clientIngest


The client can ingest content which does not exist in server. Be default, client ingest is disabled.

@property (readwrite,
    assign,
    nonatomic) BOOL clientIngest; 

dailyCellularQuota


Daily cellular quota.

@property (readonly,
    assign,
    atomic) int64_t dailyCellularQuota; 
Discussion

VOCDownloadQuotaUnlimited for no limit. The default is unlimited and server configuration could override it.


dailyCellularUsed


Daily cellular data used.

@property (readonly,
    assign,
    atomic) int64_t dailyCellularUsed; 
Discussion

Resets to 0 at 00:00.


dailyDownloadUsed


The sum of dailyWifiUsed and dailyCellularUsed.

@property (readonly,
    assign,
    atomic) int64_t dailyDownloadUsed; 

dailyWifiQuota


Daily wifi quota.

@property (readonly,
    assign,
    atomic) int64_t dailyWifiQuota; 
Discussion

VOCDownloadQuotaUnlimited for no limit. The default is unlimited and server configuration could override it.


dailyWifiUsed


Daily wifi data used.

@property (readonly,
    assign,
    atomic) int64_t dailyWifiUsed; 
Discussion

Resets to 0 at 00:00.


delayedRegistration


Whether or not server registration happens on first download

@property (readonly,
    atomic) BOOL delayedRegistration; 

downloadOnlyWhenCharging


If YES, downloads are only allowed when charging.

@property (readwrite,
    assign,
    nonatomic) BOOL downloadOnlyWhenCharging; 
Discussion

Default value is NO.


enableAutoPurge


If YES, triggers SDK purge mechanism when needed.

@property (readwrite,
    assign,
    nonatomic) BOOL enableAutoPurge; 
Discussion

By default voc service automatically manages the cache.It removes the old content from DB and its associated files from cache folder. This can be disabled and managed by SDK customer by setting this property to NO.


fileSizeMax


Files larger than this value will not be downloaded.

@property (readwrite,
    assign,
    atomic) int64_t fileSizeMax; 
Discussion

Default value is 104 MB.


forceDownload


if Yes, user download request will start immediately and does not respect device policies.

@property (readwrite,
    assign,
    nonatomic) BOOL forceDownload; 
Discussion

Default value is NO.


foregroundContentCheckDelay


Seconds after coming to foreground to delay a check for new content.

@property (readwrite,
    assign,
    nonatomic) NSTimeInterval foregroundContentCheckDelay; 
Discussion

This delay helps reduce interference with time-critical tasks such as UI setup. Default value is 3.0 seconds.


ignoredHTTPMethods


Set a list of HTTP methods to be ignored by the SDK. These will be rejected by the SDK's NSURLProtocol handler and will pass to the next handler in line. This may be your own handler or the default system handler.

@property (readwrite,
    strong,
    nonatomic,
    nullable) NSArray<NSString*> *ignoredHTTPMethods; 
Discussion

Defaults to ["OPTIONS"]. Set nil to tell the SDK to handle all HTTP methods. Case and sequence in array do not matter.


itemDownloadBehavior


This configuration will drive the download behavior of sdk provided the item download behavior is set to VOCItemDownloadSdkBehavior.

@property (readwrite,
    assign,
    nonatomic) VOCItemDownloadBehavior itemDownloadBehavior; 
Discussion

Default behavior is download all files associated with the item automatically. Individual item can override this behavior. See VocItem::downloadBehavior VOCItemDownloadSdkBehavior is an invalid value for this config.


license


The license provided through configuration or registration API.

@property (readonly,
    nullable,
    atomic,
    strong) NSString *license; 

lookupServerHost


Upon user/sdk registration, the registration request will be sent to lookup server to identify the server host that manages the account.

@property (readonly,
    nonnull,
    nonatomic) NSURL *lookupServerHost; 
Discussion

This configuration holds the effective setting for voc lookup server. It returns lookupServerHostOverride if set, else it returns lookupServerHostDefault.


lookupServerHostDefault


The default setting for voc lookup server.

@property (readonly,
    nonnull,
    nonatomic) NSURL *lookupServerHostDefault; 

lookupServerHostOverride


Setting for voc lookup server that overrides the default.

@property (readwrite,
    nullable,
    atomic) NSURL *lookupServerHostOverride; 
Discussion

It is usually nil but during testing can be used to point to dev/qa servers.


lowBatteryLimit


Downloads will not occur if battery level is below this limit.

@property (readwrite,
    assign,
    nonatomic) int16_t lowBatteryLimit; 
Discussion

The value is from 0 to 100. Default is 0.


maxConcurrentDownloads


Limits the number of concurrent downloads, -1 no limit.

@property (readwrite,
    assign,
    nonatomic) int maxConcurrentDownloads; 
Discussion

Default value is -1.


maxLaterDownloads


Limits the number of downloads that are scheduled later, -1 no limit.

@property (readwrite,
    assign,
    nonatomic) int maxLaterDownloads; 
Discussion

Default value is 1000.


networkSelection


Access this configuration to know if downloads happen on wifi only, wifi and cellular or can be disabled all together.

@property (readonly,
    assign,
    nonatomic) VOCNetworkSelection networkSelection; 
Discussion

Default value is VOCNetworkSelectionWifiAndCellular and server configuration could override it.


networkSelectionDefault


Access this configuration to know what is the server network preference for download.

@property (readonly,
    assign,
    nonatomic) VOCNetworkSelection networkSelectionDefault; 

networkSelectionOverride


Allows client to controls if download needs to happen on wifi only, wifi and cellular or can be disabled all together.

@property (readwrite,
    assign,
    nonatomic) VOCNetworkSelection networkSelectionOverride; 
Discussion

Default value is VOCNetworkSelectionInvalid and it is a value used internally. SDK discourages client to set VOCNetworkSelectionInvalid value.


serverHost


Serverhost is the one that manages the content on the device.

@property (readonly,
    nonnull,
    nonatomic) NSURL *serverHost; 
Discussion

This configuration holds the effective setting for voc server. It returns serverHostOverride if set, else it returns serverHostFromLookup.


serverHostFromLookup


The voc server setting obtained from voc lookup.

@property (readonly,
    nonnull,
    atomic,
    strong) NSURL *serverHostFromLookup; 

serverHostOverride


Setting for voc server that overrides the value from lookup.

@property (readwrite,
    nullable,
    atomic) NSURL *serverHostOverride; 
Discussion

It is usually nil but during testing can be used to point to dev/qa servers.


trackFileDownloadProgress


If set as NO, VocService::bytesDownloaded wont be updated.

@property (readwrite,
    assign,
    nonatomic) BOOL trackFileDownloadProgress; 
Discussion

During download bytesDownloaded is updated every time a chunk of data is downloaded.However sometimes if download is interrupted it cannot be resumed and bytesDownloaded will reset to 0. This might not be desired behavior and can be changed by setting this property to NO. When this property is set to NO bytesDownloaded is not updated until after the file is fully downloaded. Default value is YES.


useProductionApns


Tells voc server to use production APNS (Apple Push Notification Service) environment.

@property (readwrite,
    assign,
    nonatomic) BOOL useProductionApns; 
Discussion

By default the value is YES. It takes effect during registration so it has to be set before registering. Changes after registering have no effect.


vocId


Unique id for voc service assigned during registration.

@property (readonly,
    nullable,
    atomic,
    strong) NSString *vocId;