Atalasoft MobileImage API Reference
Instance Methods | Properties | List of all members
KFXServerProjectProvider Class Reference

Server Project Provider. More...

#import <KFXServerProjectProvider.h>

Inheritance diagram for KFXServerProjectProvider:

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 project data version. More...
(void) - getProject:version:completionHandler:
 Get project data. More...
(void) - getVariant:forProject:version:completionHandler:
 Get variant data. More...


id< kfxKUTCertificateValidatorDelegatecertificateValidatorDelegate
 Certificate validator delegate. More...

Detailed Description

Server Project Provider.

A reference implementation of KFXProjectProviderProtocol that downloads assets from a Mobile ID 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

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.

projectName- project name.
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


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

serverUrl- server URL. If nil, nil object will be returned.
See also
- (instancetype) initWithURL: (NSURL *)  serverUrl
cacheProvider: (id< KFXBundleCacheProviderProtocol >)  cacheProvider 


Initializes the object with server URL and custom cache provider.

serverUrl- server 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
- (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.

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.

requestTimeout- request timeout in seconds.

Property Documentation

- (id<kfxKUTCertificateValidatorDelegate>) certificateValidatorDelegate

Certificate validator delegate.

This property allows to set a custom handler for SSL certificate validation.

See also

The documentation for this class was generated from the following file:
Untitled Document © 2017 Atalasoft, Inc., 116 Pleasant St, Suite 321, Easthampton, MA 01027, U.S.A. All rights reserved. Use is subject to license terms.