Closed pavlo-kravchenko closed 6 months ago
Thanks for the report. It looks like you're using this package using a Python Swift wrapper (I'm guessing PythonKit), which isn't a configuration we officially support. We're happy to incorporate any fixes that are needed to support PythonKit (or any other Swift integration library), but we're not in a position to provide much help for this configuration.
The only thing I can think of that might be related to the error you're seeing is binary stripping. Xcode has a build setting "Enable Testability", which is enabled for debug builds (the default for Xcode-local builds), and disabled for release builds (required for submission to the App Store). This setting strips the compiled binary of "unused" symbols to minimise the size of the final executable - however, because of the dynamic nature of Python, all symbols appear as "unused" from the perspective of the compiler. It is therefore necessary to enable the "Enable Testability" setting on release builds. This setting is enabled when you use this package in a Briefcase app (the officially supported usage), but won't be if you've built your own Xcode project from scratch.
Thanks a lot This really helped
Thank you for this tip, this was key for me as well.
Describe the bug
I get error in app from TestFlight PythonLibrary.loadSymbol(name:legacyName:type:) ()
But all work good on device if I install app from Xcode
Steps to reproduce
Expected behavior
Not crash
Screenshots
Environment
Logs
Additional context
Code swift
Code python