Class: XcodeprojMerge

Inherits:
Object
  • Object
show all
Defined in:
lib/xcodeproj_merge.rb,
lib/xcodeproj_merge/version.rb

Constant Summary collapse

VERSION =
"0.1.0"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_project_path, destination_project_path) ⇒ XcodeprojMerge

Returns a new instance of XcodeprojMerge.



5
6
7
8
# File 'lib/xcodeproj_merge.rb', line 5

def initialize(source_project_path, destination_project_path)
  @source      = Xcodeproj::Project.open(source_project_path)
  @destination = Xcodeproj::Project.open(destination_project_path)
end

Instance Attribute Details

#destinationObject (readonly)

Returns the value of attribute destination.



10
11
12
# File 'lib/xcodeproj_merge.rb', line 10

def destination
  @destination
end

#sourceObject (readonly)

Returns the value of attribute source.



10
11
12
# File 'lib/xcodeproj_merge.rb', line 10

def source
  @source
end

Instance Method Details

#callObject



12
13
14
15
16
17
# File 'lib/xcodeproj_merge.rb', line 12

def call
  build_phase_names.each do |phase_name|
    merge_file_references_for_phase(phase_name)
  end
  destination.save
end