class CocoapodsLZClear::Tools
Public Instance Methods
get_project(file_path)
click to toggle source
# File lib/cocoapods-lzclear/command/lzclear.rb, line 21 def get_project(file_path) projPath = 'unknow' Dir.foreach(file_path) do |file| extn = File.extname file if extn == '.xcodeproj' projPath = file_path+file break end end return projPath end
get_target(path)
click to toggle source
# File lib/cocoapods-lzclear/command/lzclear.rb, line 43 def get_target(path) targets = Array.new project = Xcodeproj::Project.open(path) target = project.targets[0] if target != nil target.build_phases.each do |phase| if phase.instance_of? Xcodeproj::Project::Object::PBXShellScriptBuildPhase if phase.name == '[CP] Copy Pods Resources' files = phase.output_paths if files != nil files.clear Pod::UI.puts 'Clean Output Files!' end paths = phase.output_file_list_paths if paths != nil paths.clear Pod::UI.puts 'Clean Output File Lists!' end end end end end project.save end