Open Merlini93 opened 4 years ago
it seems your project has no productName
?
The PBXAggregateTarget
section appears to contain objects with a name
and optionally a productName
. If a PBXAggregateTarget
object omits the productName
key the error occurs, I found an example in the SwiftCoroutines project.
this issue has already been mentioned in PR #49 , but this change would break the project file. Using the SwiftCoroutines project mentioned above, xunique it with the PR twice, the project file breaks. Commands below:
xunique -v SwiftCoroutines/ios/Pods/Pods.xcodeproj
Uniquify and Sort done Uniquify and Sort Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/bin/xunique", line 8, in
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xUnique.py", line 546, in main
xunique.unique_project()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xUnique.py", line 188, in unique_project
self.unique_project(self.root_hex)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xUnique.py", line 365, in unique_project
self.set_to_result(project_hex, target_hex, cur_path_key)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xUnique.py", line 141, in set_to_result
current_path = '/'.join([str(current_node[i]) for i in current_path_key])
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xUnique.py", line 141, in
current_path = '/'.join([str(current_node[i]) for i in current_path_key])
KeyError: 'productName'