WTWikitudeNativeSDK(Plugins) Category Reference

Declared in WTWikitudeNativeSDK+Plugins.h

Overview

WTWikitudeNativeSDK+Plugins defines some methods that can be used to register C++ plugins in the Wikitude Native SDK.

To use C++ code within your Objective-C class, set the file extension to .mm or change the type to Objective-C++ source in the Xcode Identity and Type inspector.

Plugins need to derive from wikitude::sdk::Plugin and have to be passes as std::shared_ptr.

– registerPlugin:error:

Call this method to register a new plugin.

- (BOOL)registerPlugin:(std : : shared_ptr<wikitude::sdk::Plugin>)plugin error:(NSError *__autoreleasing *)error

Parameters

plugin

The plugin that should be registered

error

An error object that will be filled when plugin registration fails

Return Value

BOOL YES if the plugin could be registered successfully, NO otherwise

Discussion

If a plugin with the same identifier is already registered, NO is returned, YES otherwise.

Declared In

WTWikitudeNativeSDK+Plugins.h

– registerPlugin:

Call this method to register a new plugin. (Deprecated: Since version 2.1.0. Use -registerPlugin:plugin:error: instead.)

- (BOOL)registerPlugin:(std : : shared_ptr<wikitude::sdk::Plugin>)plugin

Parameters

plugin

The plugin that should be registered

Return Value

BOOL YES if the plugin could be registered successfully, NO otherwise

Discussion

If a plugin with the same identifier is already registered, NO is returned, YES otherwise.

Declared In

WTWikitudeNativeSDK+Plugins.h

– removePlugin:

Call this method to remove an already registered plugin.

- (BOOL)removePlugin:(std : : shared_ptr<wikitude::sdk::Plugin>)plugin

Parameters

plugin

The plugin that should be removed.

Return Value

BOOL YES if the plugin was known and could be removed, NO otherwise.

Discussion

If the given plugin ptr is not registered, NO is returned, YES otherwise.

Declared In

WTWikitudeNativeSDK+Plugins.h

– removeNamedPlugin:

Call this method to remove an already registered plugin.

- (BOOL)removeNamedPlugin:(NSString *)pluginIdentifier

Parameters

pluginIdentifier

The Identifier that uniquely identifies the plugin that should be removed.

Return Value

BOOL YES if the plugin was known and could be removed, NO otherwise.

Discussion

Same as -removePlugin but searches for the plugin to remove by the given identifier. Using this method, no shared_ptr property needs to be added to any object because the Wikitude Native SDK takes ownership of any plugin.

Declared In

WTWikitudeNativeSDK+Plugins.h