Method: Xcodeproj::XCScheme#save_as
- Defined in:
- lib/xcodeproj/scheme.rb
#save_as(project_path, name, shared = true) ⇒ void
This method returns an undefined value.
Serializes the current state of the object to a “.xcscheme” file.
314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/xcodeproj/scheme.rb', line 314 def save_as(project_path, name, shared = true) scheme_folder_path = if shared self.class.shared_data_dir(project_path) else self.class.user_data_dir(project_path) end scheme_folder_path.mkpath scheme_path = scheme_folder_path + "#{name}.xcscheme" @file_path = scheme_path File.open(scheme_path, 'w') do |f| f.write(to_s) end end |