-1

I developed a software that provides some augmented reality. Now I want it to work on IOS devices (mostly iPad). All my tracking functions are in C++, do I have any way to make them work on IOS devices ? Is it possible to create a bridge between a c++ DLL and Swift ? if it is, how can I do that ?

Thank you really much.

Willeke
  • 14,578
  • 4
  • 19
  • 47
sa.l_dev
  • 189
  • 1
  • 10
  • 1
    Graphic functions are a perfect example of why what you trying to is completely impossible: if you use DirectX functions in the DLL how is that supposed to work on iOS? – luk2302 Nov 28 '16 at 18:34
  • Just because it's a DLL doesn't mean it's using DirectX, it *could* be using OpenGL – Alexander Nov 28 '16 at 18:39
  • 1
    More Information is needed. On what platform? A Windows DLL or a "dynamically loaded library" in the general sense? What kind of functions? – But generally, you can call C functions from Swift, but not C++ functions. – Martin R Nov 28 '16 at 18:39
  • 1
    ... which makes it a duplicate of http://stackoverflow.com/questions/35229149/interacting-with-c-classes-from-swift or http://stackoverflow.com/questions/24042774/can-i-mix-swift-with-c-like-the-objective-c-mm-files – Martin R Nov 28 '16 at 18:41

1 Answers1

1

Hi Saadi the answer is no.

Because DLL stands for Dynamic Linked Library and it is a Window Based Way to Pack Functionality.

Once you are in Swift I suposed you are in Apple Enviroment, so this will not work at all.

if you have the source-code of your DLL, the best you can do is to try to adapt from the source code, and compile it to Apple Platform, and then use it.

  • 3
    Swift does not necessarily means Apple. It works on [linux](https://www.raywenderlich.com/122189/introduction-to-open-source-swift-on-linux) and there is a port on [windows](https://swiftforwindows.codeplex.com/) too. It should be able to work, but I believe you will have to do this on a windows machine and I have not done windows dev in 10+years. – Arnaud Thiercelin Nov 28 '16 at 18:36
  • LiNked, it was a Keyboard Mistake. while typing it fast. – Alvaro Valle Nov 28 '16 at 18:47