From a91179b3dd9d662f28199a01cc0326a7ca310d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=B4=E5=AF=92?= Date: Sat, 6 Sep 2014 12:02:25 +0800 Subject: [PATCH] Fixes #11: include another Type of PBXTargetDependency --- xUnique.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xUnique.py b/xUnique.py index 11a8963..6901d2b 100755 --- a/xUnique.py +++ b/xUnique.py @@ -335,6 +335,7 @@ def __unique_target(self, target_hex): self.__unique_build_configuration_list(target_hex, bcl_hex) dependencies_list = current_node.get('dependencies') if dependencies_list: + self.vprint('uniquify PBXTargetDependency') for dependency_hex in dependencies_list: self.__unique_target_dependency(target_hex, dependency_hex) build_phases_list = current_node['buildPhases'] @@ -343,8 +344,11 @@ def __unique_target(self, target_hex): def __unique_target_dependency(self, parent_hex, target_dependency_hex): '''PBXTargetDependency''' - target_hex = self.nodes[target_dependency_hex]['target'] - self.__set_to_result(parent_hex, target_dependency_hex, self.__result[target_hex]['path']) + target_hex = self.nodes[target_dependency_hex].get('target') + if target_hex: + self.__set_to_result(parent_hex, target_dependency_hex, self.__result[target_hex]['path']) + else: + self.__set_to_result(parent_hex, target_dependency_hex, 'name') self.__unique_container_item_proxy(target_dependency_hex, self.nodes[target_dependency_hex]['targetProxy']) def __unique_container_item_proxy(self, parent_hex, container_item_proxy_hex):