class Phoenx::ApplicationTargetBuilder

Public Instance Methods

add_sub_projects() click to toggle source
# File lib/phoenx/use_cases/generate_target.rb, line 275
def add_sub_projects
        super
        frameworks_group = @project.main_group.find_subpath(FRAMEWORKS_ROOT,false)
        @target_spec.dependencies.each do |dp|
                file = nil
                if dp.embed == false
                        next
                end
                if dp.path == nil
                        # Copy internal references
                        target = Phoenx.target_for_name(@project,dp.target_name)
                        build_file = @copy_frameworks.add_file_reference(target.product_reference)
                        build_file.settings = ATTRIBUTES_CODE_SIGN_ON_COPY
                else
                        # Copy external products
                        proj_file = frameworks_group.find_file_by_path(dp.path)
                        proj = Xcodeproj::Project::open(dp.path)
                        target = Phoenx.target_for_name(proj,dp.target_name)
                        proj_file.file_reference_proxies.each do |e|
                                if e.remote_ref.remote_global_id_string == target.product_reference.uuid
                                        build_file = @copy_frameworks.add_file_reference(e)
                                        build_file.settings = ATTRIBUTES_CODE_SIGN_ON_COPY
                                end
                        end
                end
        end
end
build() click to toggle source
Calls superclass method Phoenx::TestableTargetBuilder#build
# File lib/phoenx/use_cases/generate_target.rb, line 303
def build
        @target = @project.new_target(@target_spec.target_type, @target_spec.name, @target_spec.platform, @target_spec.version)
        @copy_frameworks = @target.new_copy_files_build_phase "Embed Frameworks"
        @copy_frameworks.symbol_dst_subfolder_spec = :frameworks
        super()
        self.framework_files.each do |file|
                build_file = @copy_frameworks.add_file_reference(file)
                build_file.settings = ATTRIBUTES_CODE_SIGN_ON_COPY
        end
end
target() click to toggle source
# File lib/phoenx/use_cases/generate_target.rb, line 314
def target
        return @target
end