Kofax Mobile SDK API Reference
Instance Methods | Properties | List of all members
KFXServerProjectProvider Class Reference

Server Project Provider. More...

#import <KFXServerProjectProvider.h>

Inheritance diagram for KFXServerProjectProvider:
<KFXProjectProviderProtocol>

Instance Methods

(instancetype) - initWithURL:
 Constructor. More...
 
(instancetype) - initWithURL:cacheProvider:
 Constructor. More...
 
(void) - loadAllVariantsForProject:completionHandler:
 Load all variants. More...
 
(void) - cancelLoadAllVariants
 Cancel load all variants. More...
 
(void) - setRequestTimeout:
 Set request timeout. More...
 
(NSString *) - getLatestCachedModelDataInfo:
 Get latest cached model data build information. More...
 
- Instance Methods inherited from <KFXProjectProviderProtocol>
(void) - getHighestVersion:sdkVersion:completionHandler:
 Get latest data version. More...
 
(void) - getHighestVersion:completionHandler:
 Get latest data version. More...
 
(void) - getProject:version:completionHandler:
 Get project data. More...
 
(void) - getProject:completionHandler:
 Get project data. More...
 
(void) - getVariant:forProject:version:completionHandler:
 Get variant data. More...
 
(void) - getVariant:version:completionHandler:
 Get variant data. More...
 
(NSString *) - getLatestCachedModelDataInfo
 Get latest cached model data build information. More...
 

Properties

id< kfxKUTCertificateValidatorDelegatecertificateValidatorDelegate
 Certificate validator delegate. More...
 

Detailed Description

Server Project Provider.

A reference implementation of KFXProjectProviderProtocol that downloads assets from a Kofax Quick Updater service instance.

Project and variant data are first looked in the cache. If the specified version is found, the cached data will be returned without reaching the server.

If internal server error message is present, it will be accessible from callback error's userInfo via KFXInternalServerErrorKey. E.g. NSString* internalErrorMessage = error.userInfo[KFXInternalServerErrorKey];

Default cunstructor ([KFXServerProjectProvider new] or [[KFXServerProjectProvider alloc] init]) returns nil.

See also
KFXProjectProviderProtocol

Method Documentation

- (void) cancelLoadAllVariants

Cancel load all variants.

This method cancels loadAllVariants for all projects. Already downloaded data will not be deleted.

Note that cancel is not an immediate operation. When cancel is complete, completionHandler of the loadAllVariantsForProject:completionHandler: will be fired with KMC_EX_OPERATION_CANCEL_SUCCESS error.

Calling loadAllVariantsForProject:completionHandler: again before receiving cancel callback for previous call is undefined behavior.

- (NSString*) getLatestCachedModelDataInfo: (NSString *)  projectName

Get latest cached model data build information.

Use this method to get the latest cached model data build information for the given project.

Parameters
projectName- project name.
Returns
cached model data build information for project. Will be nil if model data build inforation was not found.

Reimplemented from <KFXProjectProviderProtocol>.

- (instancetype) initWithURL: (NSURL *)  serverUrl

Constructor.

Initializes the object with serverl URL and default cache provider, which is KFXBundleCacheProvider with default cache directory.

Parameters
serverUrl- The Kofax Quick Updater instance URL. If nil, nil object will be returned.
See also
KFXBundleCacheProvider
- (instancetype) initWithURL: (NSURL *)  serverUrl
cacheProvider: (id< KFXBundleCacheProviderProtocol >)  cacheProvider 

Constructor.

Initializes the object with server URL and custom cache provider.

Parameters
serverUrl- The Kofax Quick Updater instance URL. If nil, nil object will be returned.
cacheProvider- cache provider instance that conforms to KFXBundleCacheProviderProtocol. If nil, nil object will be returned.
See also
KFXBundleCacheProviderProtocol
- (void) loadAllVariantsForProject: (NSString *)  projectName
completionHandler: (void(^)(NSError *error))  completionHandler 

Load all variants.

This method downloads all variants for the given project. It checks the lastest available version on server. If the latest server and cached version are the same, it will go through variant list and download only missing variants.

Parameters
projectName- project name.
completionHandler- callback will be fired on completion. If nil no work will be done.
  • error: contains an error if there is one.
- (void) setRequestTimeout: (NSTimeInterval)  requestTimeout

Set request timeout.

This method allows to customize request timeout for HTTP requests.

Changing the timeout value will not affect the current session, it will take effect during the next session.

Default value is 10 seconds.

Parameters
requestTimeout- request timeout in seconds.

Property Documentation

- (id<kfxKUTCertificateValidatorDelegate>) certificateValidatorDelegate
readwritenonatomicweak

Certificate validator delegate.

Sets a custom handler for SSL certificate validation. The delegate handles certificate validation challenges in response to an authentication request from the Kofax Quick Updater instance.

See also
kfxKUTCertificateValidatorDelegate

The documentation for this class was generated from the following file:
Untitled Document © 2018 Kofax, Inc. All rights reserved. Use is subject to license terms.