VocConfig
IntroductionVoc service configuration. Methods
setBlacklist:This method will blacklist a list of host names - (void)setBlacklist:(nullable NSArray<NSString*> *) blacklist; ParametersDiscussionThe 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; ParametersDiscussionAll 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
addUserAgentif 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; DiscussionDefault value is NO. autoFollowRedirectsTell 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; DiscussionDefaults to YES. clientIngestThe client can ingest content which does not exist in server. Be default, client ingest is disabled. @property (readwrite, assign, nonatomic) BOOL clientIngest; dailyCellularQuotaDaily cellular quota. @property (readonly, assign, atomic) int64_t dailyCellularQuota; DiscussionVOCDownloadQuotaUnlimited for no limit. The default is unlimited and server configuration could override it. dailyCellularUsedDaily cellular data used. @property (readonly, assign, atomic) int64_t dailyCellularUsed; DiscussionResets to 0 at 00:00. dailyDownloadUsedThe sum of dailyWifiUsed and dailyCellularUsed. @property (readonly, assign, atomic) int64_t dailyDownloadUsed; dailyWifiQuotaDaily wifi quota. @property (readonly, assign, atomic) int64_t dailyWifiQuota; DiscussionVOCDownloadQuotaUnlimited for no limit. The default is unlimited and server configuration could override it. dailyWifiUsedDaily wifi data used. @property (readonly, assign, atomic) int64_t dailyWifiUsed; DiscussionResets to 0 at 00:00. delayedRegistrationWhether or not server registration happens on first download @property (readonly, atomic) BOOL delayedRegistration; downloadOnlyWhenChargingIf YES, downloads are only allowed when charging. @property (readwrite, assign, nonatomic) BOOL downloadOnlyWhenCharging; DiscussionDefault value is NO. enableAutoPurgeIf YES, triggers SDK purge mechanism when needed. @property (readwrite, assign, nonatomic) BOOL enableAutoPurge; DiscussionBy 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. fileSizeMaxFiles larger than this value will not be downloaded. @property (readwrite, assign, atomic) int64_t fileSizeMax; DiscussionDefault value is 104 MB. forceDownloadif Yes, user download request will start immediately and does not respect device policies. @property (readwrite, assign, nonatomic) BOOL forceDownload; DiscussionDefault value is NO. foregroundContentCheckDelaySeconds after coming to foreground to delay a check for new content. @property (readwrite, assign, nonatomic) NSTimeInterval foregroundContentCheckDelay; DiscussionThis delay helps reduce interference with time-critical tasks such as UI setup. Default value is 3.0 seconds. ignoredHTTPMethodsSet 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; DiscussionDefaults to ["OPTIONS"]. Set nil to tell the SDK to handle all HTTP methods. Case and sequence in array do not matter. itemDownloadBehaviorThis configuration will drive the download behavior of sdk provided the item download behavior is set to VOCItemDownloadSdkBehavior. @property (readwrite, assign, nonatomic) VOCItemDownloadBehavior itemDownloadBehavior; DiscussionDefault 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. licenseThe license provided through configuration or registration API. @property (readonly, nullable, atomic, strong) NSString *license; lookupServerHostUpon 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; DiscussionThis configuration holds the effective setting for voc lookup server. It returns lookupServerHostOverride if set, else it returns lookupServerHostDefault. lookupServerHostDefaultThe default setting for voc lookup server. @property (readonly, nonnull, nonatomic) NSURL *lookupServerHostDefault; lookupServerHostOverrideSetting for voc lookup server that overrides the default. @property (readwrite, nullable, atomic) NSURL *lookupServerHostOverride; DiscussionIt is usually nil but during testing can be used to point to dev/qa servers. lowBatteryLimitDownloads will not occur if battery level is below this limit. @property (readwrite, assign, nonatomic) int16_t lowBatteryLimit; DiscussionThe value is from 0 to 100. Default is 0. maxConcurrentDownloadsLimits the number of concurrent downloads, -1 no limit. @property (readwrite, assign, nonatomic) int maxConcurrentDownloads; DiscussionDefault value is -1. maxLaterDownloadsLimits the number of downloads that are scheduled later, -1 no limit. @property (readwrite, assign, nonatomic) int maxLaterDownloads; DiscussionDefault value is 1000. networkSelectionAccess 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; DiscussionDefault value is VOCNetworkSelectionWifiAndCellular and server configuration could override it. networkSelectionDefaultAccess this configuration to know what is the server network preference for download. @property (readonly, assign, nonatomic) VOCNetworkSelection networkSelectionDefault; networkSelectionOverrideAllows 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; DiscussionDefault value is VOCNetworkSelectionInvalid and it is a value used internally. SDK discourages client to set VOCNetworkSelectionInvalid value. serverHostServerhost is the one that manages the content on the device. @property (readonly, nonnull, nonatomic) NSURL *serverHost; DiscussionThis configuration holds the effective setting for voc server. It returns serverHostOverride if set, else it returns serverHostFromLookup. serverHostFromLookupThe voc server setting obtained from voc lookup. @property (readonly, nonnull, atomic, strong) NSURL *serverHostFromLookup; serverHostOverrideSetting for voc server that overrides the value from lookup. @property (readwrite, nullable, atomic) NSURL *serverHostOverride; DiscussionIt is usually nil but during testing can be used to point to dev/qa servers. trackFileDownloadProgressIf set as NO, VocService::bytesDownloaded wont be updated. @property (readwrite, assign, nonatomic) BOOL trackFileDownloadProgress; DiscussionDuring 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. useProductionApnsTells voc server to use production APNS (Apple Push Notification Service) environment. @property (readwrite, assign, nonatomic) BOOL useProductionApns; DiscussionBy default the value is YES. It takes effect during registration so it has to be set before registering. Changes after registering have no effect. vocIdUnique id for voc service assigned during registration. @property (readonly, nullable, atomic, strong) NSString *vocId; |