Class: Jumpstarter::Xcode::DuplicateScheme

Inherits:
I_Instructions show all
Defined in:
lib/jumpstarter_core/xcode.rb

Instance Method Summary collapse

Methods inherited from I_Instructions

#clean_value, #compose!, #crash_on_error!, #error_message!, #initialize, #options, #success_message!

Constructor Details

This class inherits a constructor from Jumpstarter::I_Instructions

Instance Method Details

#run!Object



18
19
20
21
22
23
24
# File 'lib/jumpstarter_core/xcode.rb', line 18

def run!()
    existing_scheme_path = @original_shared ? Xcodeproj::XCScheme.shared_data_dir(@proj_path) : Xcodeproj::XCScheme.user_data_dir(@proj_path)
    existing_scheme = "#{existing_scheme_path}/#{@original_scheme_name}.xcscheme"
    new_scheme = Xcodeproj::XCScheme.new(existing_scheme)
    new_scheme.save_as(@proj_path, @new_scheme_name, @new_shared)
    return true
end