WTTrackerManager Class Reference

Inherits from NSObject
Declared in WTTrackerManager.h

Overview

WTTrackerManger provides factory methods to create certain tracker objects.

– createTargetCollectionResourceFromURL:completion:

Returns a weak pointer to a newly created WTTargetCollectionResource object, used to load a target collection file.

- (WTTargetCollectionResource *)createTargetCollectionResourceFromURL:(nonnull NSURL *)resourceURL completion:(WTTargetCollectionResourceCompletionHandler)errorHandler

Parameters

resourceURL

A URL from where the target collection resource should be loaded from. Files can be loaded from the application bundle or a remote server.

errorHandler

An object that conforms to the WTTargetCollectionResourceCompletionHandler protocol.

Return Value

WTTargetCollectionResource * A pointer to a newly created WTTargetCollectionResource object.

Discussion

Callers need to make sure to retain the reference count e.g. by assigning to a strong property.

Declared In

WTTrackerManager.h

– createCloudRecognitionServiceWithClientToken:targetCollectionId:completion:

Returns a weak pointer to a newly created WTCloudRecognitionService object, used to offload image target recognition to the Wikitude cloud recognition servers.

- (WTCloudRecognitionService *)createCloudRecognitionServiceWithClientToken:(nonnull NSString *)clientToken targetCollectionId:(nonnull NSString *)targetCollectionId completion:(WTCloudRecognitionServiceInitializationHandler)initializationHandler

Parameters

clientToken

The client token that is associated with your Wikitude cloud recognition account.

targetCollectionId

The identifier for the target collection that should be loaded on the Wikitude cloud recognition server.

initializationHandler

An object that conforms to the WTCloudRecognitionServiceInitializationHandler protocol.

Return Value

WTCloudRecognitionService * A pointer to a newly created WTCloudRecognitionService object.

Discussion

Callers need to make sure to retain the reference count e.g. by assigning to a strong property.

Declared In

WTTrackerManager.h

– createImageTrackerFromTargetCollectionResource:delegate:configuration:

Returns a weak pointer to a newly created WTImageTracker object, configured for 2d tracking using a wtc file loaded by a WTTargetCollectionResource.

- (WTImageTracker *)createImageTrackerFromTargetCollectionResource:(nonnull WTTargetCollectionResource *)targetCollectionResource delegate:(nonnull id<WTImageTrackerDelegate>)delegate configuration:(nullable void ( ^ ) ( WTImageTrackerConfiguration *imageTrackerConfiguration ))configuration

Parameters

targetCollectionResource

The target collection resource used to load the wtc file.

delegate

An object that conforms to the WTImageTrackerDelegate protocol.

configuration

A configuration object used to define how the image tracker behaves.

Return Value

WTImageTracker * A pointer to a newly created WTImageTracker object.

Discussion

Callers need to make sure to retain the reference count e.g. by assigning to a strong property.

Declared In

WTTrackerManager.h

– createImageTrackerFromCloudRecognitionService:delegate:configuration:

Returns a weak pointer to a newly created WTImageTracker object, configured for 2d tracking using the WTCloudRecognitionService to offload recognition to the Wikitude cloud recognition servers.

- (WTImageTracker *)createImageTrackerFromCloudRecognitionService:(nonnull WTCloudRecognitionService *)cloudRecognitionService delegate:(nonnull id<WTImageTrackerDelegate>)delegate configuration:(nullable void ( ^ ) ( WTImageTrackerConfiguration *imageTrackerConfiguration ))configuration

Parameters

cloudRecognitionService

The cloud recognition service used to communicate with the Wikitude cloud recognition servers.

delegate

An object that conforms to the WTImageTrackerDelegate protocol.

configuration

A configuration object used to define how the image tracker behaves.

Return Value

WTImageTracker * A pointer to a newly created WTImageTracker object.

Discussion

Callers need to make sure to retain the reference count e.g. by assigning to a strong property.

Declared In

WTTrackerManager.h

– createObjectTrackerFromTargetCollectionResource:delegate:

Returns a weak pointer to a newly created WTObjectTracker object, configured for 3d tracking using a wmc file loaded by a WTTargetCollectionResource.

- (WTObjectTracker *)createObjectTrackerFromTargetCollectionResource:(nonnull WTTargetCollectionResource *)targetCollectionResource delegate:(nonnull id<WTObjectTrackerDelegate>)delegate

Parameters

targetCollectionResource

The target collection resource used to load the wmc file.

delegate

An object that conforms to the WTObjectTrackerDelegate protocol.

Return Value

WTObjectTracker * A pointer to a newly created WTObjectTracker object.

Discussion

Callers need to make sure to retain the reference count e.g. by assigning to a strong property.

Declared In

WTTrackerManager.h

– createInstantTracker:configuration:

Returns a weak pointer to a newly created WTInstantTracker object, configured for 3d tracking of a scene without any markers

- (WTInstantTracker *)createInstantTracker:(nonnull id<WTInstantTrackerDelegate>)delegate configuration:(nullable NSObject *)reserved

Parameters

delegate

An object that conforms to the WTObjectTrackerDelegate protocol.

reserved

A configuration object used to define how the instant tracker should behave. This parameter is currently not used.

Return Value

WTObjectTracker * A pointer to a newly created WTObjectTracker object.

Discussion

Callers need to make sure to retain the reference count e.g. by assigning to a strong property.

Declared In

WTTrackerManager.h

– create2DClientTrackerFromURL:extendedTargets:andDelegate:

Returns a weak pointer to a newly created WTClientTracker object, configured for 2d tracking. (Deprecated: Since version 2.0.0. Use -createImageTrackerFromTargetCollectionResource:delegate:configuration: instead.)

- (WTClientTracker *)create2DClientTrackerFromURL:(nonnull NSURL *)clientTrackerURL extendedTargets:(nullable NSArray *)extendedTargets andDelegate:(nonnull id<WTClientTrackerDelegate>)delegate

Parameters

clientTrackerURL

A URL from where the client tracker should be loaded from. Client tracker can be loaded from the application bundle or a remote server.

extendedTargets

An array containing string objects where each one of them represents an image target that should be tracked as extended target.

delegate

A object that conforms to the WTClientTrackerDelegate protocol.

Return Value

WTClientTracker * A pointer to a newly created WTClientTracker object.

Discussion

Callers need to make sure to retain the reference count e.g. by assigning to a strong property.

Declared In

WTTrackerManager.h

– create3DClientTrackerFromURL:andDelegate:

Returns a weak pointer to a newly created WTClientTracker object, configured for 3d tracking. (Deprecated: Since version 2.0.0. Use -createObjectTrackerFromTargetCollectionResource:delegate: instead.)

- (WTClientTracker *)create3DClientTrackerFromURL:(nonnull NSURL *)trackingMapURL andDelegate:(nonnull id<WTClientTrackerDelegate>)delegate

Parameters

trackingMapURL

A URL from where the tracking map should be loaded from. Tracking maps can be loaded from the application bundle or a remote server.

delegate

A object that conforms to the WTClientTrackerDelegate protocol.

Return Value

WTClientTracker * A pointer to a newly created WTClientTracker object.

Discussion

Callers need to make sure to retian the reference count e.g. by assigning to a strong property.

Declared In

WTTrackerManager.h

– createCloudTrackerWithToken:targetCollectionId:extendedTargets:andDelegate:

Returns a weak pointer to a newly created WTCloudTracker object. (Deprecated: Since version 2.0.0. Use -createImageTrackerFromCloudRecognitionService:delegate:configuration: instead.)

- (WTCloudTracker *)createCloudTrackerWithToken:(nonnull NSString *)authenticationToken targetCollectionId:(nonnull NSString *)targetCollectionId extendedTargets:(nullable NSArray *)extendedTargets andDelegate:(id<WTCloudTrackerDelegate>)delegate

Parameters

authenticationToken

The client token that is associated with your Wikitude cloud recognition account.

targetCollectionId

An identifier which target collection should be loaded on the Wikitude cloud recognition server.

extendedTargets

An array containing string objects where each one of them represents an image target that should be tracked as extended target.

delegate

A object that conforms to the WTCloudTrackerDelegate protocol.

Return Value

WTCloudTracker * A pointer to a newly created WTCloudTracker object.

Discussion

Callers need to make sure to retian the reference count e.g. by assigning to a strong property.

Declared In

WTTrackerManager.h

– setCloudRecognitionServerRegion:

Specifies the regional-distributed Wikitude server the SDK should contact when using cloud recognition.

- (void)setCloudRecognitionServerRegion:(WTCloudRecognitionServerRegion)cloudRecognitionServerRegion

Parameters

cloudRecognitionServerRegion

A constant of type WTCloudRecognitionServerRegion that specifies the regional cloud recognition server that should be contacted.

Discussion

After this method is called, every cloud tracker that is created will contact the specified regional cloud recognition server. If a tracker was already created, it will still point to the previously defined region.

This method is typically called after the Wikitude Native SDK was created and the user location was determined if necessary.

The Wikitude Native SDK will by default connect to WTCloudRecognitionServerRegion_Europe.

Declared In

WTTrackerManager.h