Can I write Python applications using PyObjC that target NON-jailbroken iPhones?
Question:
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?
Answers:
no, apple strictly forbids running any kind of interpreter on iphone, and it is completely policy issue.
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.
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.
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.
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?
no, apple strictly forbids running any kind of interpreter on iphone, and it is completely policy issue.
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.
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.
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.