Skip to content

Instantly share code, notes, and snippets.

@Fenil15
Fenil15 / duplicate_xcode_project_target.rb
Last active April 8, 2022 10:42 — forked from ratazzi/duplicate_xcode_project_target.rb
Duplicate Xcode Project Target with Ruby
#!/usr/bin/env ruby
require 'rubygems'
require 'xcodeproj'
name = 'test_copy'
proj = Xcodeproj::Project.open('test.xcodeproj')
src_target = proj.targets.find { |item| item.to_s == 'test' }