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:
<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...
 
- 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...
 

Properties

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.

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.

- (instancetype) initWithURL: (NSURL *)  serverUrl

Constructor.

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

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

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

See also
kfxKUTCertificateValidatorDelegate

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