Python 3.13+platformterm
platform.IOSVersionInfo
specific operating systems
The result type of platform.ios_ver(): a named tuple with the fields system, release, model and is_simulator.
Syntax
platform.IOSVersionInfo(system, release, model, is_simulator)
A plain namedtuple: fields are readable by name and by index, and unpacking needs exactly four variables. The class name is irregular (not ios_ver_result), which makes it easy to mistype in annotations; the class has no documentation entry of its own, and its contract is defined by ios_ver().
Examples
import platform
info = platform.IOSVersionInfo('iOS', '17.2', 'iPhone13,2', False)
print(info.release, info[2]) # → 17.2 iPhone13,2
print(isinstance(platform.ios_ver(), platform.IOSVersionInfo)) # → True
See also
Open in the full glossarydocs.python.orgReport an inaccuracy