swift - pythonKit crashes on release version

183 Views Asked by At

I'm trying to use pythonKit in order to run a Pyhton code from swift.

This code works fine:

let sys = Python.import("sys")
      sys.path.append("Users/fusic/Desktop/PyrhonTest/PyrhonTest/")
      let example = Python.import("main")
    button.title = String(example.hello()) ?? ""

Then, I archive my project and run the app's release version. When pythonKit is called, the app crashes. These is the beginning of the report log. Any ideas how to fix this?

enter image description here

1

There are 1 best solutions below

2
On

What worked for me is to turn off Enable Bitcode and set Strip Style to Debugging Symbols for both Release and Debug.