Handle same Framework multiple times in Xcode.
@@ -131,8 +131,8 @@ class PbxDict:
self.items = []
def add_item(self, key, value, comment=''):
- item = PbxDictItem(key, value, comment)
assert key not in self.keys
+ item = PbxDictItem(key, value, comment)
self.keys.add(key)
self.items.append(item)
@@ -601,7 +601,9 @@ class XCodeBackend(backends.Backend):
if isinstance(dep, dependencies.AppleFrameworks):
for f in dep.frameworks:
fw_dict = PbxDict()
- objects_dict.add_item(self.native_frameworks[f], fw_dict, f'{f}.framework in Frameworks')
+ fwkey = self.native_frameworks[f]
+ if fwkey not in objects_dict.keys:
+ objects_dict.add_item(fwkey, fw_dict, f'{f}.framework in Frameworks')
fw_dict.add_item('isa', 'PBXBuildFile')
fw_dict.add_item('fileRef', self.native_frameworks_fileref[f], f)
