PEP 730: Adding iOS as a supported platform

platform.node() - the user-provided name of the device, as returned by the [[UIDevice currentDevice] systemName] system call (e.g., "Janes-iPhone"). For simulated devices, this will be the name of the development computer running the simulator.

Including this in the list implies that platform.node would return something different to os.uname().nodename. Is this actually the case? I don’t have a physical iPhone to test on.

platform seems like a better place for that, because it already has various platform-specific functions with a consistent naming convention. And this would also solve the next issue:

platform.machine() - The device model returned by [[UIDevice currentDevice] model] (e.g., "iPhone13,2"); or "iPhoneSimulator" for simulated devices.

This is inconsistent with the existing platforms, where platform.machine returns the architecture (e.g. arm64 or x86_64).

Instead, how about adding a new function platform.ios_ver(), returning a namedtuple of (release, model, simulator)?

And if you can just do model == "iPhoneSimulator", is the simulator flag even needed?