@@ -58,7 +58,7 @@ Notes on availability
58
58
operating system.
59
59
60
60
* If not separately noted, all functions that claim "Availability: Unix" are
61
- supported on macOS, which builds on a Unix core.
61
+ supported on macOS and iOS, both of which build on a Unix core.
62
62
63
63
* If an availability note contains both a minimum Kernel version and a minimum
64
64
libc version, then both conditions must hold. For example a feature with note
@@ -119,3 +119,44 @@ DOM APIs as well as limited networking capabilities with JavaScript's
119
119
.. _wasmtime : https://wasmtime.dev/
120
120
.. _Pyodide : https://pyodide.org/
121
121
.. _PyScript : https://pyscript.net/
122
+
123
+ .. _iOS-availability :
124
+
125
+ iOS
126
+ ---
127
+
128
+ iOS is, in most respects, a POSIX operating system. File I/O, socket handling,
129
+ and threading all behave as they would on any POSIX operating system. However,
130
+ there are several major differences between iOS and other POSIX systems.
131
+
132
+ * iOS can only use Python in "embedded" mode. There is no Python REPL, and no
133
+ ability to execute binaries that are part of the normal Python developer
134
+ experience, such as :program: `pip `. To add Python code to your iOS app, you must use
135
+ the :ref: `Python embedding API <embedding >` to add a Python interpreter to an
136
+ iOS app created with Xcode. See the :ref: `iOS usage guide <using-ios >` for
137
+ more details.
138
+
139
+ * An iOS app cannot use any form of subprocessing, background processing, or
140
+ inter-process communication. If an iOS app attempts to create a subprocess,
141
+ the process creating the subprocess will either lock up, or crash. An iOS app
142
+ has no visibility of other applications that are running, nor any ability to
143
+ communicate with other running applications, outside of the iOS-specific APIs
144
+ that exist for this purpose.
145
+
146
+ * iOS apps have limited access to modify system resources (such as the system
147
+ clock). These resources will often be *readable *, but attempts to modify
148
+ those resources will usually fail.
149
+
150
+ * iOS apps have a limited concept of console input and output. ``stdout `` and
151
+ ``stderr `` *exist *, and content written to ``stdout `` and ``stderr `` will be
152
+ visible in logs when running in Xcode, but this content *won't * be recorded
153
+ in the system log. If a user who has installed your app provides their app
154
+ logs as a diagnostic aid, they will not include any detail written to
155
+ ``stdout `` or ``stderr ``.
156
+
157
+ iOS apps have no concept of ``stdin `` at all. While iOS apps can have a
158
+ keyboard, this is a software feature, not something that is attached to
159
+ ``stdin ``.
160
+
161
+ As a result, Python library that involve console manipulation (such as
162
+ :mod: `curses ` and :mod: `readline `) are not available on iOS.
0 commit comments