VDARSDKControllerDelegate Protocol Reference
Conforms to | NSObject |
Declared in | VDARSDKController.h |
Overview
The protocol which should be implemented by delegates of the VDARSDKController which want to receive events when a context has been detected or lost (i.e. not detected anymore) (See the Context class for the different context state).
This protocol must be implemented by delegates added to [VDARSDKController detectionDelegates].
Tasks
-
– didEnterContext:
Called when a context has been detected. The detected context is given in the context parameter.
-
– didExitContext:
Called when a context has been lost (i.e. not anymore detected in the last frames processed). The lost context is given in the context parameter.
-
– codesDetected:
Called when a code is detected.
-
– shouldDisplayNotificationList
Called when a notification has been posted while the application is opened. A notification list should be open (if not already) and refreshed.
-
– contextDidRequireSynchronization:
Called when some context or content requires the app to trigger a synchronization based on a given tag. The app should start the synchronization with the given tag(s) right away or at the end of the currently running synchronization.
-
– didDispatchEventInApp:withParams:
Called when device dispatch an event to the app.
-
– appSpecificAJAXRequestGeneratedForURL:withData:
Called when a special AJAX app specific request is generated. The delegate should answer with a valid string or nil if it is unsupported or an error occured.
-
– errorOccuredOnModelManager:
This method is called when a fatal error has occured on the VDARSDKController.
required method
Instance Methods
appSpecificAJAXRequestGeneratedForURL:withData:
Called when a special AJAX app specific request is generated. The delegate should answer with a valid string or nil if it is unsupported or an error occured.
- (NSString *)appSpecificAJAXRequestGeneratedForURL:(NSURL *)url withData:(NSString *)data
Parameters
- url
URL of the request
- data
data of the request (can be nil)
Availability
Verison 5.1.9
Discussion
Called when a special AJAX app specific request is generated. The delegate should answer with a valid string or nil if it is unsupported or an error occured.
Declared In
VDARSDKController.h
codesDetected:
Called when a code is detected.
- (void)codesDetected:(NSArray<VDARCode*> *)codes
Parameters
- codes
An array of VDARCode objects corresponding to the recognized codes
Availability
Version 1.1.0beta r230
Discussion
Called when a code is detected.
This will only be called if the code recognition is activated on the VDARSDKController by setting the [VDARSDKController enableCodesRecognition] to 1.
Note that the recognition will only work if no VDARContext is currently recognized and being tracked.
Warning: QR Code having an URL field starting with vdarsdk:// will be automatically treated by the SDK. Therefore, you should not trigger any action on those codes. Those code can be identified with the special [VDARCode isSpecialCode] property set to YES. See VDARSDKController.enableCodesRecognition property for more information about special codes.
Declared In
VDARSDKController.h
contextDidRequireSynchronization:
Called when some context or content requires the app to trigger a synchronization based on a given tag. The app should start the synchronization with the given tag(s) right away or at the end of the currently running synchronization.
- (void)contextDidRequireSynchronization:(NSArray<VDARPrior*> *)priors
Parameters
- priors
a list of VDARPrior object to launch the synchronization for.
Availability
Verison 5.1.0
Discussion
Called when some context or content requires the app to trigger a synchronization based on a given tag. The app should start the synchronization with the given tag(s) right away or at the end of the currently running synchronization.
Declared In
VDARSDKController.h
didDispatchEventInApp:withParams:
Called when device dispatch an event to the app.
- (void)didDispatchEventInApp:(NSString *)eventName withParams:(NSString *)eventParams
Parameters
- eventName
name of the event
- eventParams
string containing the event parameters
Availability
Verison 5.1.0
Discussion
Called when device dispatch an event to the app.
Declared In
VDARSDKController.h
didEnterContext:
Called when a context has been detected. The detected context is given in the context parameter.
- (void)didEnterContext:(VDARContext *)context
Parameters
- context
The context which has been detected.
Availability
Version 5.0
Discussion
Called when a context has been detected. The detected context is given in the context parameter.
Declared In
VDARSDKController.h
didExitContext:
Called when a context has been lost (i.e. not anymore detected in the last frames processed). The lost context is given in the context parameter.
- (void)didExitContext:(VDARContext *)context
Parameters
- context
The context which has been lost.
Availability
Version 5.0
Discussion
Called when a context has been lost (i.e. not anymore detected in the last frames processed). The lost context is given in the context parameter.
Declared In
VDARSDKController.h
errorOccuredOnModelManager:
This method is called when a fatal error has occured on the VDARSDKController.
- (void)errorOccuredOnModelManager:(NSError *)err
Parameters
- err
The occured error
Availability
Version 1.0beta r85
Discussion
This method is called when a fatal error has occured on the VDARSDKController.
This usually happens when the system wasn’t able to verify the license of Vidinoti AR SDK after too many launches / too many days. The AR system is thus deactivated and this method is called. The error domain, in that case, is set to @“com.vidinoti.VDARSDKController.CertificateSignatureError”. Note that if this error happens, the user can restart the application with a valid Internet connection to correct that error.
You should inform the user of the problem.
Declared In
VDARSDKController.h
shouldDisplayNotificationList
Called when a notification has been posted while the application is opened. A notification list should be open (if not already) and refreshed.
- (void)shouldDisplayNotificationList
Availability
Version 5.1.0
Discussion
Called when a notification has been posted while the application is opened. A notification list should be open (if not already) and refreshed.
Declared In
VDARSDKController.h