Xcode.app/Contents/Developer/Platforms. Each platform represents an Apple platform type (such as iOS or tvOS) combined with one or more related CPU architectures. For example, the iOS simulator platform supports
Specific instances of this type can be retrieved from the fields of the apple_common.platform struct:
More commonly, however, the apple configuration fragment has fields/methods that allow rules to determine the platform for which a target is being built.
p = apple_common.platform.ios_device print(p.name_in_plist) # 'iPhoneOS'
True if this platform is a device platform or
False if it is a simulator platform.
string apple_platform.name_in_plistThe name of the platform as it appears in the
CFBundleSupportedPlatforms entry of an Info.plist file and in Xcode's platforms directory, without the extension (for example,
This name, when converted to lowercase (e.g.,
iphonesimulator), can be passed to Xcode's command-line tools like
actool when they expect a platform name.
apple_platform_type apple_platform.platform_typeReturns the platform type of this platform.