11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/objc/xcode_project.rb', line 11
def add(files)
project = Xcode.project(project_path)
puts "Loading files into #{project} at #{project_path}"
target = project.target(target_name)
test_group = project.group(group_name)
source_files_in_project = files.data.map do |path_data|
test_group.create_file path_data
end
files_required_to_be_built = source_files_in_project.reject do |file|
file.name.end_with?("h")
end
target.sources_build_phase do
files_required_to_be_built.each do |source_file|
add_build_file source_file
end
end
project.save!
end
|