lib/cocoapods-jxedt/binary/helper/prebuild_sandbox.rb in cocoapods-jxedt-0.0.17 vs lib/cocoapods-jxedt/binary/helper/prebuild_sandbox.rb in cocoapods-jxedt-0.0.18

- old
+ new

@@ -49,10 +49,12 @@ # | # +-- PodTargetN.xcodeproj # # class JxedtPrebuildSandbox < Sandbox + attr_accessor :index_project_create_stage + # [Pod::Sandbox] standard_sandbox def self.from_standard_sandbox(sandbox, sandbox_path: nil, real_path_compiler: false) prebuild_sandbox_path = Pathname.new(sandbox.root).realpath + '../Pods-Source' prebuild_sandbox = new(prebuild_sandbox_path) # initialize @@ -103,30 +105,21 @@ end standard_sandbox.root end def project_path + if index_project_create_stage + return root + index_project_name + end root + 'Pods-Source.xcodeproj' end - def clean_source_project! - if Jxedt.config.keep_source_project? - # 修改productName后,可以把源码工程拖入workspace中源码调试,而源码不链接和编译 - require 'xcodeproj' - project = Xcodeproj::Project.open(project_path) - project.targets.each do |target| - target.build_configurations.each do |config| - # 修改工程的product name - product_name = config.build_settings['PRODUCT_NAME'] || target.name - config.build_settings['PRODUCT_NAME'] = "#{product_name}_Source" - end - # target.name = "#{target.name}_Source" - end - project.save + def index_project_name + return 'Pods-Index.xcodeproj' + end - # 保存源码工程,退出 - return - end + def clean_source_project! + return if Jxedt.config.keep_source_project? sources_root.rmtree if real_path_compiler? && sources_root.exist? root.rmtree if root.exist? end end \ No newline at end of file