xcode: Generate files for highest detected version

Some settings require "objectVersion" to be set to a certain value or
Xcode will not use it. To fix this, we set it to the highest possible
value, determined by the detected version of Xcode. We also set
"compatibilityVersion", but mainly so it lines up with "objectVersion".

At the same time, we should not be generating Xcode 3.2-compatible
projects by default anyway.
pull/13292/head
Albert Tang 1 year ago committed by Jussi Pakkanen
parent 8499e4535b
commit da20ea01ca
  1. 4
      mesonbuild/backend/xcodebackend.py

@ -1271,7 +1271,7 @@ class XCodeBackend(backends.Backend):
project_dict.add_item('buildStyles', style_arr)
for name, idval in self.buildstylemap.items():
style_arr.add_item(idval, name)
project_dict.add_item('compatibilityVersion', '"Xcode 3.2"')
project_dict.add_item('compatibilityVersion', f'"{self.xcodeversion}"')
project_dict.add_item('hasScannedForEncodings', 0)
project_dict.add_item('mainGroup', self.maingroup_id)
project_dict.add_item('projectDirPath', '"' + self.environment.get_source_dir() + '"')
@ -1870,7 +1870,7 @@ class XCodeBackend(backends.Backend):
def generate_prefix(self, pbxdict: PbxDict) -> PbxDict:
pbxdict.add_item('archiveVersion', '1')
pbxdict.add_item('classes', PbxDict())
pbxdict.add_item('objectVersion', '46')
pbxdict.add_item('objectVersion', self.objversion)
objects_dict = PbxDict()
pbxdict.add_item('objects', objects_dict)

Loading…
Cancel
Save