第一个SO答案,所以请原谅格式/等。我经历了一段时间,遇到了不同的错误,但总体上是相同的问题。我希望这对您有帮助-需要考虑的一些资源:
<-这是在iOS上运行后需要建模的东西,我的解决方案适用于Mac Catalyst (预装了Python的Mac)
2)Python Kit教程 -这个人一步一步地介绍了如何实现PythonKit
这对我有用:
1)在签名和功能中禁用应用沙箱:
在“应用程序沙箱”的右上角的“签名和功能”下,有一个“ X”,单击以删除该应用程序沙箱
2) In “Hardened Runtime” under Signing and Capabilities: check “Disable Library Validation”
Image of checkbox for Disable Library Validation
Now, I haven’t yet submitted an app to the App Store under these provisions, but at least my python files and libraries load / build / run!
UPDATE 05/15/2020:
For Mac Developer Distribution, you will have to sign all .so or .dylib’s included with your app, along with the Python Interpreter and bin folder. I made a quick bash script to run through each one when done with dev.
function signThese() {
find . -name "*.$1" | while read line; do
codesign --force --verbose=4 --options=runtime --timestamp --sign "Developer ID Application: [INSERT YOUR CERT HERE]" $line
done
}
This will allow you to use AppSand@R_157_2419@ in Signing and Capabilities, and all Hardened Runtime Options (as in not disabling library validation).