-1

I have a huge python script with a lot of libraries. I need to do this functionality in swift. But it is super complicated to do this with it. Is there a way to convert this part to c or obj c or something. And then call this script?

Arti
  • 7,356
  • 12
  • 57
  • 122

1 Answers1

1

First you need C-source code. Then you can compile this code with Xcode to a library. Finally, you can call into it from Swift. (Swift can call natively into C).

These are roughly the steps.

AstroCB
  • 12,337
  • 20
  • 57
  • 73
Darko
  • 9,655
  • 9
  • 36
  • 48