Start a new topic

Plugins API and Xamarin

Plugins API and Xamarin


Hi Ian,
I'm sorry if I guided you in a way which has potentially no solution. However, I guess I can resolve some confusion: WTArchitectView has the API that is needed to register plugins in a Obj C category called WTArchitectView+Plugins.h. The reason why you don't see it exposed in C# is that we currently don't know how to represent it's method signature in C# as it has a C++ std::shared_ptr as parameter.

WTWikitudeNativeSDK is a file from our newest SDK product. This SDK does not have a JS API but is only available in Obj C and Java. It also doesn't contain all the drawing features from the SDK with the JS SDK. This new product is for developer who want to implement everyting in language that is native to the platform.

At the moment I'm waiting for some feedback from Xamarin on how we can provide the C++ parameter in Obj C / Java. I let you know as soon as we got feedback from them.

Best regards,

Andreas

Andreas,

So, just trying to get this plugin working, and I am a little confused as to what object I call registerPlugin on? Presumably, I will be creating the Wikitude components in Xamarin (creating a WTArchitectView), and then passing something across to the native library for it to call registerPlugin on, but that method is implemented on the WTWikitudeNativeSDK interface. So how do we morph a WTArchitectView into a WTWikitudeNativeSDK interface?

Regards,

Ian

Thanks Andreas, I will give this a try.

Regards,

Ian

Hi Ian,
It is possible but not straight forward. The following links explain how you can use a native iOS/Android library in Xamarin. Your native libraries need to contain the actual plugin you want to write and also a method which returns the counter part to our registerPlugin API. Do you have any experience with iOS or Android development? I would recommend to start with iOS since it is easier to work with C/C++ code. If you have a look at our iOS example application and combine that with the link above, you should be able to register a plugin. After you a full iOS setup, you should be able to apply the same principles to Android.

I assue that you might have some more questions in the future, so please ask whenever you need help.

Best regards,

Andreas

I am just wondering if there is any way to use a plugin in a Xamarin iOS project. We want to implement a filter like in your Custom Camera sample of the Native Examples xcode project, but our app is actually a Xamarin app.

Regards,

Ian
Login or Signup to post a comment