-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_ux_panels.rb
More file actions
executable file
·40 lines (29 loc) · 918 Bytes
/
add_ux_panels.rb
File metadata and controls
executable file
·40 lines (29 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env ruby
require 'xcodeproj'
project_path = 'MLX Code.xcodeproj'
project = Xcodeproj::Project.open(project_path)
# Get the main target
target = project.targets.first
# Find the Views group
views_group = project.main_group.find_subpath('MLX Code/Views', true)
# Files to add
files_to_add = [
'MLX Code/Views/ImageGenerationPanel.swift',
'MLX Code/Views/VoiceCloningPanel.swift'
]
files_to_add.each do |file_path|
# Check if file already exists in project
existing_file = views_group.files.find { |f| f.path == File.basename(file_path) }
unless existing_file
# Add file reference
file_ref = views_group.new_reference(file_path)
# Add to target
target.add_file_references([file_ref])
puts "✅ Added #{File.basename(file_path)}"
else
puts "⚠️ #{File.basename(file_path)} already in project"
end
end
# Save the project
project.save
puts "✅ Project saved"