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'
Trueif this platform is a device platform or
Falseif it is a simulator platform.
string apple_platform.name_in_plistThe name of the platform as it appears in the
CFBundleSupportedPlatformsentry of an Info.plist file and in Xcode's platforms directory, without the extension (for example,
iphonesimulator), can be passed to Xcode's command-line tools like
actoolwhen they expect a platform name.
apple_platform_type apple_platform.platform_typeReturns the platform type of this platform.