Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(688)

Unified Diff: pylib/gyp/xcode_emulation.py

Issue 27035003: ninja/mac: Add iOS fields to ExtraPlistItems for ninja builds. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: cleanup Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pylib/gyp/xcode_emulation.py
===================================================================
--- pylib/gyp/xcode_emulation.py (revision 1753)
+++ pylib/gyp/xcode_emulation.py (working copy)
@@ -792,10 +792,14 @@
build = build.split()[-1]
return version, build
+ def _XcodeIOSDeviceFamily(self, configname):
+ family = self.xcode_settings[configname].get('TARGETED_DEVICE_FAMILY', '1')
+ return [int(x) for x in family.split(',')]
+
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 +814,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):

Powered by Google App Engine
This is Rietveld 408576698