class Framework::Tree
Attributes
fwk_path[RW]
headers_path[R]
module_map_path[R]
name[RW]
resources_path[R]
root_path[R]
versions_path[RW]
Public Class Methods
new(name, platform, embedded)
click to toggle source
# File lib/cocoapods-packager/framework.rb, line 16 def initialize(name, platform, embedded) @name = name @platform = platform @embedded = embedded end
Public Instance Methods
delete_resources()
click to toggle source
# File lib/cocoapods-packager/framework.rb, line 11 def delete_resources Pathname.new(@resources_path).rmtree (Pathname.new(@fwk_path) + Pathname.new('Resources')).delete end
make()
click to toggle source
# File lib/cocoapods-packager/framework.rb, line 22 def make make_root make_framework make_headers make_resources make_current_version end
process_static_framework()
click to toggle source
# File lib/cocoapods-packager/framework.rb, line 30 def process_static_framework `rm -rf #{@fwk_path}/Headers` `rm -rf #{@fwk_path}/Resources` `rm -rf #{@fwk_path}/#{@name}` `cp -r #{@versions_path}/* #{fwk_path}` `rm -rf #{@fwk_path}/Versions` end
Private Instance Methods
make_current_version()
click to toggle source
# File lib/cocoapods-packager/framework.rb, line 40 def make_current_version current_version_path = @versions_path + Pathname.new('../Current') `ln -sf A #{current_version_path}` `ln -sf Versions/Current/Headers #{@fwk_path}/` `ln -sf Versions/Current/Resources #{@fwk_path}/` `ln -sf Versions/Current/#{@name} #{@fwk_path}/` end
make_framework()
click to toggle source
# File lib/cocoapods-packager/framework.rb, line 48 def make_framework @fwk_path = @root_path + Pathname.new(@name + '.framework') @fwk_path.mkdir unless @fwk_path.exist? @module_map_path = @fwk_path + Pathname.new('Modules') @versions_path = @fwk_path + Pathname.new('Versions/A') end
make_headers()
click to toggle source
# File lib/cocoapods-packager/framework.rb, line 57 def make_headers @headers_path = @versions_path + Pathname.new('Headers') @headers_path.mkpath unless @headers_path.exist? end
make_resources()
click to toggle source
# File lib/cocoapods-packager/framework.rb, line 62 def make_resources @resources_path = @versions_path + Pathname.new('Resources') @resources_path.mkpath unless @resources_path.exist? end
make_root()
click to toggle source
# File lib/cocoapods-packager/framework.rb, line 67 def make_root @root_path = Pathname.new(@platform) if @embedded @root_path += Pathname.new(@name + '.embeddedframework') end @root_path.mkpath unless @root_path.exist? end