Index: pylib/gyp/xcode_emulation.py |
=================================================================== |
--- pylib/gyp/xcode_emulation.py (revision 1750) |
+++ pylib/gyp/xcode_emulation.py (working copy) |
@@ -792,10 +792,18 @@ |
build = build.split()[-1] |
return version, build |
+ def _XcodeIOSDeviceFamily(self, configname): |
+ family = self.xcode_settings[configname].get('TARGETED_DEVICE_FAMILY') |
Nico
2013/10/11 20:20:49
return self.xcode_settings[configname].get('TARGET
justincohen
2013/10/12 14:52:28
Almost, I needed to add an int(x) for x in foo. P
|
+ if family == '1,2': |
+ return [1,2] |
+ elif family == '2': |
+ return [2] |
+ return [1] |
+ |
def GetExtraPlistItems(self, configname=None): |
"""Returns a dictionary with extra items to insert into Info.plist.""" |
- if not XcodeSettings._plist_cache: |
- cache = XcodeSettings._plist_cache |
+ if configname not in XcodeSettings._plist_cache: |
+ cache = {} |
cache['BuildMachineOSBuild'] = self._BuildMachineOSBuild() |
xcode, xcode_build = self._XcodeVersion() |
@@ -810,7 +818,14 @@ |
else: |
cache['DTSDKBuild'] = cache['BuildMachineOSBuild'] |
- return XcodeSettings._plist_cache |
+ if self.isIOS: |
+ cache['UIDeviceFamily'] = self._XcodeIOSDeviceFamily(configname) |
+ if configname.endswith("iphoneos"): |
+ cache['CFBundleSupportedPlatforms'] = ['iPhoneOS'] |
+ else: |
+ cache['CFBundleSupportedPlatforms'] = ['iPhoneSimulator'] |
+ XcodeSettings._plist_cache[configname] = cache |
+ return XcodeSettings._plist_cache[configname] |
class MacPrefixHeader(object): |