我可以使用 PyObjC 编写面向非越狱 iPhone 的 Python 应用程序吗?

发布于 2024-08-03 05:51:10 字数 106 浏览 1 评论 0 原文

目前是否可以为 iPhone 编译 Python 和 PyObjC,以便 AppStore 应用程序可以用 Python 编写?

如果不是,这是纯粹的技术问题还是苹果故意的政策决定?

Is it currently possible to compile Python and PyObjC for the iPhone such that AppStore applications can written in Python?

If not, is this a purely technical issue or a deliberate policy decision by Apple?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

清风无影 2024-08-10 05:51:10

不:这是 Apple 故意的政策决定(无疑有一些技术基础),不支持 iPhone 上大多数语言的解释器/运行时 - Apple 希望您使用 ObjC(以及 Safari 中的 Javascript),而不是 Python、Java、Ruby、等等。

No: it's Apple's deliberate policy decision (no doubt with some technical underpinnings) to not support interpreters/runtimes on iPhone for most languages -- ObjC (and Javascript within Safari) is what Apple wants you to use, not Python, Java, Ruby, and so forth.

风吹过旳痕迹 2024-08-10 05:51:10

不,你不能使用 PyObjC 编写 iPhone 应用程序,原因很简单,PyObjC 根本不支持 iOS,而只针对 macOS。

No you cannot use PyObjC to write iPhone applications, for the simple reason that PyObjC does not support iOS at all but only targets macOS.

最佳男配角 2024-08-10 05:51:10

不,苹果严格禁止在 iPhone 上运行任何类型的解释器,这完全是政策问题。

no, apple strictly forbids running any kind of interpreter on iphone, and it is completely policy issue.

寄意 2024-08-10 05:51:10

是的(大部分)。一个好方法是使用 Pythonista 及其 Xcode 模板。

这里建议禁止此类应用程序的其他答案是基于对“下载代码”的当时准确的禁令,但这从未得到一致执行,并且 它已经大约 7 年没有生效了

这似乎有风险,因为 Pythonista 已经在应用商店中停滞了一段时间;然而,虽然 Pythonista Beta 目前已完整,但新版本“很快”即将推出,支持Python 3.10。

如果您需要在更频繁发布的应用程序中使用更新版本的 Python,但不需要 Xcode 模板在应用程序商店中分发您的应用程序,您可以查看 Pyto

(大部分):它有自己的 FFI,但由于运行时的打包方式存在一些差异,所以与 PyObjC 不太一样。

Yes(mostly). A good way to do this is to use Pythonista and its Xcode template.

The other answers here suggesting that such apps are prohibited are based on an accurate-at-the-time ban on "downloading code", but this was never consistently enforced and it hasn't been in effect for about 7 years.

This might seem risky since Pythonista has been moribund on the app store for some time; however, while the Pythonista beta is currently full but a new version is coming "soon" that supports Python 3.10.

If you need a more recent version of Python in a more frequently-released app, but don't need the Xcode templates to distribute your app on the app store, you can check out Pyto.

(mostly): It has its own FFI that isn't quite PyObjC due to some differendes in the way the runtime is packaged.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文