Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (13 sloc) 389 Bytes
require 'xcodeproj'
sample = ARGV[0]
project_path = "#{sample}Example.xcodeproj"
project = Xcodeproj::Project.open(project_path)
# Add a file to the project in the main group
file_name = 'GoogleService-Info.plist'
file = project.new_file(file_name)
# Add the file to the all targets
project.targets.each do |target|
target.add_file_references([file])
end
#save project
project.save()
You can’t perform that action at this time.