Skip to content

Instantly share code, notes, and snippets.

@sandeeplearner
Created August 17, 2020 21:39
Show Gist options
  • Save sandeeplearner/b59cbcfb4304ea30341dd914ffcadd4e to your computer and use it in GitHub Desktop.
Save sandeeplearner/b59cbcfb4304ea30341dd914ffcadd4e to your computer and use it in GitHub Desktop.
Get hold of targets
#!/usr/bin/ruby
def get_targets(project, config_options)
targets_in_config = config_options["targetsToAdd"]
puts "#{targets_in_config}"
project.native_targets.each do |target|
puts "target name is #{target.name}"
if targets_in_config.include?(target.name)
puts "about to insert #{target}"
puts "Targets array is #{@targets.count}"
@targets << target
end
end
puts "Found targets are #{@targets}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment