-1

We're working on an existing Xamarin Forms app and we need to integrate with some third party hardware. The hardware OEM provides multiple *.a and *.h files for interacting with this hardware on iOS. The third party libraries consist of C++ classes with methods to call to interact with the hardware. We have found documentation on how we could call static C++ functions, but we can't find documentation on how to invoke new instances of C++ classes and their methods.

In using a class defined in a c++ dll in c# code it appears that we will need to create C++ static wrappers for interacting with the C++ class instances, but the original post here is rather old and is not related to iOS or Xamarin.

Is there currently a better option that anyone can recommend?

IowaEric
  • 66
  • 5
  • 1
    Did you stumble across [this](https://docs.microsoft.com/en-us/xamarin/cross-platform/cpp)? I don't think it talks about iOS specifically, but then again I don't think it needs to. – Paul Sanders May 10 '22 at 22:31
  • @PaulSanders - Yes, we have seen that. It appears to describe the same idea of creating static C++ functions to wrap the class methods. This is the route we've started on, but it will be very time consuming and we were hoping there was a better way we'd missed. Thanks. – IowaEric May 11 '22 at 13:10
  • For now, I think the MS official doc:https://docs.microsoft.com/en-us/xamarin/cross-platform/cpp/ is best option.If you have any other choices,please let us know.Thanks in advance! – Alexandar May - MSFT May 12 '22 at 09:36

0 Answers0