Start a new topic

You broke the plugin API's

Hello,


I'm using iOS Javascript SDK.  You've broken the plugin API's since version 8.3.

Now I have to rewrite my plugins... but the documentation is still outdated.   Can you please update them?


Also the "Plugin::addToJavaScriptQueue()" api is gone... any replacement method?


Hi Kai,


Can you please provide further details on what exactly is broken? And where the documentation is outdated?


Thx for your help.


Greetings

Nicola

The Wikitude SDK Plugins API has undergone many changes from v8.2 to v8.3.  Codes relying on v8.2 plugin no longer builds.

For example, Plugin::surfaceChanged(), Plugin::startRender(), Plugin::endRender(), Plugin::addToJavaScriptQueue() are gone.  And New, not yet documented class such as wikitude::sdk::ArchitectPlugin was introduced.  Many header files has been refactored.


The latest documentation at
http://www.wikitude.com/external/doc/documentation/latest/ios/pluginsapi.html#plugins-api
no longer matches the current plugin example codes included in the SDK package.

Hi Kai,

you're right, the SDK 8.3 release included already the API changes but lacking the documentation update. We will update the documentation with the upcoming release.

The short explanation to your initially mention ::addToJavaScriptQueue method: Create your own `ArchitectPlugin` subclass, register a `JavaScriptPluginModule` subclass  in your plugin subclass like `setJavaScriptPluginModule(std::make_unique<MyJavaScriptPluginModuleSubclass>();` and then call the `callJavaScript` method of the JavaScriptPluginModule subclass.


All our examples are updated to the new APIs and there are replacements for all previously available APIs, so the new examples should be a good starting point to convert to the new plugin API.


Best regards,

Andreas Schacherbauer

Login or Signup to post a comment