lib/xcake/xcode/project.rb in xcake-0.6.23 vs lib/xcake/xcode/project.rb in xcake-0.6.24

- old
+ new

@@ -127,26 +127,32 @@ # # As well as variant groups and other types of groups. # def new_group(node) - return main_group unless node + parent = node.parent + return main_group unless parent - if node.component.include?(".lproj") + if parent.component.include?(".lproj") - group = main_group.find_subpath(node.parent.path, true) unless group + group = main_group.find_subpath(parent.parent.path, true) unless group - variant_group = group.project.new(PBXVariantGroup) - variant_group.set_source_tree(:group) - group.children << variant_group + variant_group = group[node.component] + unless variant_group + variant_group = group.project.new(PBXVariantGroup) + variant_group.name = node.component + variant_group.set_source_tree(:group) + group.children << variant_group + end + group = variant_group else - group = main_group.find_subpath(node.path, true) unless group + group = main_group.find_subpath(parent.path, true) unless group end #TODO: Does this work with this new system - ensure_parent_path(group, node) + ensure_parent_path(group, parent) group end # Creates a new xcode file reference from the node