Class: Phoenx::ApplicationTargetBuilder

Inherits:
TestableTargetBuilder show all
Defined in:
lib/phoenx/use_cases/generate_target.rb

Instance Attribute Summary

Attributes inherited from TargetBuilder

#framework_files, #project, #project_spec, #target_spec

Instance Method Summary collapse

Methods inherited from TestableTargetBuilder

#add_schemes, #add_test_targets, #generate_target_scheme, #sort_build_phases

Methods inherited from TargetBuilder

#add_build_phase_scripts, #add_config_files, #add_frameworks_and_libraries, #add_headers, #add_private_headers, #add_project_headers, #add_public_headers, #add_resources, #add_sources, #add_support_files, #add_system_dependencies, #configure_target, #initialize

Constructor Details

This class inherits a constructor from Phoenx::TargetBuilder

Instance Method Details

#add_sub_projectsObject



428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/phoenx/use_cases/generate_target.rb', line 428

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

#buildObject



481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
# File 'lib/phoenx/use_cases/generate_target.rb', line 481

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

#targetObject



497
498
499
500
501
# File 'lib/phoenx/use_cases/generate_target.rb', line 497

def target

	return @target

end