【问题标题】:swift - pythonKit crashes on release versionswift - pythonKit 在发布版本上崩溃
【发布时间】:2023-03-15 20:59:01
【问题描述】:

我正在尝试使用 pythonKit 以便从 swift 运行 Pyhton 代码。

这段代码运行良好:

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

然后,我归档我的项目并运行应用的发布版本。当调用 pythonKit 时,应用程序崩溃。 这些是报告日志的开始。任何想法如何解决这个问题?

【问题讨论】:

  • 我也遇到了同样的问题...成功了吗?

标签: python swift xcode release


【解决方案1】:

对我有用的是关闭 Enable Bitcode 并将 Strip Style 设置为 Debugging Symbols 以用于发布和调试。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-12
    • 1970-01-01
    • 2020-10-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多