Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

visage|SDK does not currently provide a Swift API.
visage|SDK is implemented in C++ and provides C++ API which cannot be used directly in Swift without first wrapping C++ API in an NSObject and exposing it to Swift through bridging-header. Wrapping in an NSObject does not have to be one-on-one mapping with C++ classes, instead it can be a higher level mapping and fragments of source code from provided iOS sample projects can be used as building blocks.
General example how this technique is usually implemented can be found here:
https://stackoverflow.com/questions/48971931/bridging-c-code-into-my-swift-code-what-file-extensions-go-to-which-c-based-l

A way without wrapping NSObject is by wrapping C++ API in C-interface functions and exposing them through bridging-header. Example of such a wrapper is provided in visage|SDK in the form of VisageTrackerUnity Plugin which provides simpler, high-level API through a C-interface.
General example how this technique is usually implemented can be found here:
https://www.swiftprogrammer.info/swift_call_cpp.html

Can I use visage|SDK in WebView (in iOS and Android)?

...