Inherits from NSObject
Declared in VDARRemoteController.h

Overview

The remote controller object is reponsible of interacting with Vidinoti servers to get Context and to push related data back (for stats etc…).

Warning: This class is not thread safe and every call has to be done from the main thread.

Tasks

Properties

delegate

The delegate of this controller. The delegate can track the progress of the remote operations.

@property (nonatomic, weak) id<> delegate

Discussion

The delegate of this controller. The delegate can track the progress of the remote operations.

Declared In

VDARRemoteController.h

remoteAPIServer

The remote server API URL

@property (nonatomic, readonly) NSString *remoteAPIServer

Discussion

The remote server API URL

Warning: You can set this property only if you have requested the right in VDARSDKController and if a valid server certificate signature has been received. If the system hasn’t the right to set the property, setting it will have no effect.

Declared In

VDARRemoteController.h

useTestServer

Wether or not to use the Vidinoti test server. Activating this feature will make all the requests to be sent to the ARManager platform located at https://armanager-test.vidinoti.com instead of the usual one.

@property (nonatomic) BOOL useTestServer

Availability

Version 2.0.0GM

Discussion

Wether or not to use the Vidinoti test server. Activating this feature will make all the requests to be sent to the ARManager platform located at https://armanager-test.vidinoti.com instead of the usual one.

Warning: You should not use this property in a production app.

Declared In

VDARRemoteController.h

Class Methods

sharedInstance

Get the shared instance of that Vidinoti AR Server controller

+ (VDARRemoteController *)sharedInstance

Return Value

The shared instance of the Vidinoti AR Server controller

Discussion

Get the shared instance of that Vidinoti AR Server controller

Declared In

VDARRemoteController.h

Instance Methods

fetchRemoteModelAsynchronously:withCompletionBlock:

Download the context identified by its remote ID from the Vidinoti server and add it to the local phone context DB.

- (void)fetchRemoteModelAsynchronously:(NSString *)remoteID withCompletionBlock:(RemoteOperationCompletionHandler)completionBlock

Parameters

remoteID

The remote ID of the context to download

completionBlock

The completion handler to be called at the end of the operation (async. operation). Can be nil.

Discussion

Download the context identified by its remote ID from the Vidinoti server and add it to the local phone context DB.

This method runs asynchronously to download the required context and to add it to the DB.

Declared In

VDARRemoteController.h

syncRemoteModelsAsynchronouslyWithPriors:withCompletionBlock:

Download the contexts which match the query of priors from the Vidinoti server and synchronize them with the local DB.

- (void)syncRemoteModelsAsynchronouslyWithPriors:(NSArray *)priors withCompletionBlock:(RemoteOperationCompletionHandler)completionBlock

Parameters

priors

The priors query. All elements of that array should be of VDARPrior type.

completionBlock

The completion handler to be called at the end of the operation (async. operation). Can be nil.

Availability

Version 1.0.1beta r131

Discussion

Download the contexts which match the query of priors from the Vidinoti server and synchronize them with the local DB.

This method runs asynchronously to download the required contexts and to sync them with the local DB. Existing contexts are first deleted and then replaced by the newer ones. Existing contexts which are not present anymore on Vidinoti servers but which have been retrieved using one of the tag present in the array of priors will be deleted.

See Also

Declared In

VDARRemoteController.h

syncTagContexts:withCompletionBlock:

Downloads and stores the mapping between the given tag names and the contexts currently present on the device. This method must be called after a model synchronization and before calling VDARSDKController enableContextsWithTags.

- (void)syncTagContexts:(NSArray *)tagNames withCompletionBlock:(RemoteOperationCompletionHandler)completionBlock

Parameters

tagNames

a list of tag names

completionBlock

the callback called once the operation is over. No data is returned and an error is present if an error happened.

Discussion

Downloads and stores the mapping between the given tag names and the contexts currently present on the device. This method must be called after a model synchronization and before calling VDARSDKController enableContextsWithTags.

Declared In

VDARRemoteController.h