Returns a dictionary with extra items to insert into Info.plist.
(self, configname=None)
| 1286 | return [int(x) for x in family.split(",")] |
| 1287 | |
| 1288 | def GetExtraPlistItems(self, configname=None): |
| 1289 | """Returns a dictionary with extra items to insert into Info.plist.""" |
| 1290 | if configname not in XcodeSettings._plist_cache: |
| 1291 | cache = {} |
| 1292 | cache["BuildMachineOSBuild"] = self._BuildMachineOSBuild() |
| 1293 | |
| 1294 | xcode_version, xcode_build = XcodeVersion() |
| 1295 | cache["DTXcode"] = xcode_version |
| 1296 | cache["DTXcodeBuild"] = xcode_build |
| 1297 | compiler = self.xcode_settings[configname].get("GCC_VERSION") |
| 1298 | if compiler is not None: |
| 1299 | cache["DTCompiler"] = compiler |
| 1300 | |
| 1301 | sdk_root = self._SdkRoot(configname) |
| 1302 | if not sdk_root: |
| 1303 | sdk_root = self._DefaultSdkRoot() |
| 1304 | sdk_version = self._GetSdkVersionInfoItem(sdk_root, "--show-sdk-version") |
| 1305 | cache["DTSDKName"] = sdk_root + (sdk_version or "") |
| 1306 | if xcode_version >= "0720": |
| 1307 | cache["DTSDKBuild"] = self._GetSdkVersionInfoItem( |
| 1308 | sdk_root, "--show-sdk-build-version" |
| 1309 | ) |
| 1310 | elif xcode_version >= "0430": |
| 1311 | cache["DTSDKBuild"] = sdk_version |
| 1312 | else: |
| 1313 | cache["DTSDKBuild"] = cache["BuildMachineOSBuild"] |
| 1314 | |
| 1315 | if self.isIOS: |
| 1316 | cache["MinimumOSVersion"] = self.xcode_settings[configname].get( |
| 1317 | "IPHONEOS_DEPLOYMENT_TARGET" |
| 1318 | ) |
| 1319 | cache["DTPlatformName"] = sdk_root |
| 1320 | cache["DTPlatformVersion"] = sdk_version |
| 1321 | |
| 1322 | if configname.endswith("iphoneos"): |
| 1323 | cache["CFBundleSupportedPlatforms"] = ["iPhoneOS"] |
| 1324 | cache["DTPlatformBuild"] = cache["DTSDKBuild"] |
| 1325 | else: |
| 1326 | cache["CFBundleSupportedPlatforms"] = ["iPhoneSimulator"] |
| 1327 | # This is weird, but Xcode sets DTPlatformBuild to an empty field |
| 1328 | # for simulator builds. |
| 1329 | cache["DTPlatformBuild"] = "" |
| 1330 | XcodeSettings._plist_cache[configname] = cache |
| 1331 | |
| 1332 | # Include extra plist items that are per-target, not per global |
| 1333 | # XcodeSettings. |
| 1334 | items = dict(XcodeSettings._plist_cache[configname]) |
| 1335 | if self.isIOS: |
| 1336 | items["UIDeviceFamily"] = self._XcodeIOSDeviceFamily(configname) |
| 1337 | return items |
| 1338 | |
| 1339 | def _DefaultSdkRoot(self): |
| 1340 | """Returns the default SDKROOT to use. |
no test coverage detected