cocoapods 0.5.1 → 0.6.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. data/CHANGELOG.md +229 -2
  2. data/README.md +50 -20
  3. data/bin/pod +3 -2
  4. data/lib/cocoapods.rb +23 -9
  5. data/lib/cocoapods/command.rb +71 -30
  6. data/lib/cocoapods/command/error_report.rb +102 -0
  7. data/lib/cocoapods/command/install.rb +27 -19
  8. data/lib/cocoapods/command/list.rb +51 -8
  9. data/lib/cocoapods/command/presenter.rb +61 -0
  10. data/lib/cocoapods/command/presenter/cocoa_pod.rb +123 -0
  11. data/lib/cocoapods/command/push.rb +102 -0
  12. data/lib/cocoapods/command/repo.rb +70 -14
  13. data/lib/cocoapods/command/search.rb +7 -10
  14. data/lib/cocoapods/command/setup.rb +76 -15
  15. data/lib/cocoapods/command/spec.rb +581 -97
  16. data/lib/cocoapods/config.rb +23 -26
  17. data/lib/cocoapods/dependency.rb +86 -40
  18. data/lib/cocoapods/downloader.rb +30 -18
  19. data/lib/cocoapods/downloader/git.rb +125 -15
  20. data/lib/cocoapods/downloader/http.rb +73 -0
  21. data/lib/cocoapods/downloader/mercurial.rb +3 -9
  22. data/lib/cocoapods/downloader/subversion.rb +3 -9
  23. data/lib/cocoapods/executable.rb +26 -3
  24. data/lib/cocoapods/generator/acknowledgements.rb +37 -0
  25. data/lib/cocoapods/generator/acknowledgements/markdown.rb +38 -0
  26. data/lib/cocoapods/generator/acknowledgements/plist.rb +63 -0
  27. data/lib/cocoapods/generator/copy_resources_script.rb +8 -4
  28. data/lib/cocoapods/generator/documentation.rb +99 -0
  29. data/lib/cocoapods/generator/dummy_source.rb +14 -0
  30. data/lib/cocoapods/installer.rb +140 -109
  31. data/lib/cocoapods/installer/target_installer.rb +78 -83
  32. data/lib/cocoapods/installer/user_project_integrator.rb +162 -0
  33. data/lib/cocoapods/local_pod.rb +240 -0
  34. data/lib/cocoapods/platform.rb +41 -18
  35. data/lib/cocoapods/podfile.rb +234 -21
  36. data/lib/cocoapods/project.rb +67 -0
  37. data/lib/cocoapods/resolver.rb +62 -32
  38. data/lib/cocoapods/sandbox.rb +63 -0
  39. data/lib/cocoapods/source.rb +42 -20
  40. data/lib/cocoapods/specification.rb +294 -271
  41. data/lib/cocoapods/specification/set.rb +10 -28
  42. data/lib/cocoapods/specification/statistics.rb +112 -0
  43. metadata +124 -11
  44. data/lib/cocoapods/xcodeproj_pods.rb +0 -111
@@ -1,28 +1,21 @@
1
+ require 'colored'
2
+
1
3
  module Pod
2
4
  class Installer
3
- autoload :TargetInstaller, 'cocoapods/installer/target_installer'
4
-
5
- module Shared
6
- def dependent_specifications
7
- @dependent_specifications ||= Resolver.new(@podfile, @definition ? @definition.dependencies : nil).resolve
8
- end
9
-
10
- def build_specifications
11
- dependent_specifications.reject do |spec|
12
- spec.wrapper? || spec.defined_in_set.only_part_of_other_pod?
13
- end
14
- end
15
-
16
- def download_only_specifications
17
- dependent_specifications - build_specifications
18
- end
19
- end
5
+ autoload :TargetInstaller, 'cocoapods/installer/target_installer'
6
+ autoload :UserProjectIntegrator, 'cocoapods/installer/user_project_integrator'
20
7
 
21
8
  include Config::Mixin
22
- include Shared
9
+
10
+ attr_reader :sandbox
23
11
 
24
12
  def initialize(podfile)
25
13
  @podfile = podfile
14
+ # FIXME: pass this into the installer as a parameter
15
+ @sandbox = Sandbox.new(config.project_pods_root)
16
+ @resolver = Resolver.new(@podfile, @sandbox)
17
+ # TODO: remove in 0.7 (legacy support for config.ios? and config.osx?)
18
+ config.podfile = podfile
26
19
  end
27
20
 
28
21
  def lock_file
@@ -31,15 +24,13 @@ module Pod
31
24
 
32
25
  def project
33
26
  return @project if @project
34
- @project = Xcodeproj::Project.for_platform(@podfile.platform)
35
- # First we need to resolve dependencies across *all* targets, so that the
36
- # same correct versions of pods are being used for all targets. This
37
- # happens when we call `build_specifications'.
38
- build_specifications.each do |spec|
27
+ @project = Pod::Project.new
28
+ @project.user_build_configurations = @podfile.user_build_configurations
29
+ pods.each do |pod|
39
30
  # Add all source files to the project grouped by pod
40
- group = @project.add_pod_group(spec.name)
41
- spec.expanded_source_files.each do |path|
42
- group.children.new('path' => path.to_s)
31
+ group = @project.add_pod_group(pod.name)
32
+ pod.source_files.each do |path|
33
+ group.files.new('path' => path.to_s)
43
34
  end
44
35
  end
45
36
  # Add a group to hold all the target support files
@@ -54,69 +45,105 @@ module Pod
54
45
  end
55
46
 
56
47
  def install_dependencies!
57
- build_specifications.each do |spec|
58
- if spec.pod_destroot.exist? || spec.local?
59
- message = "Using #{spec}"
60
- message += " [LOCAL]" if spec.local?
61
- puts message unless config.silent?
62
- else
63
- puts "Installing #{spec}" unless config.silent?
64
- spec = spec.part_of_specification if spec.part_of_other_pod?
65
- downloader = Downloader.for_source(spec.pod_destroot, spec.source)
48
+ pods.each do |pod|
49
+ unless config.silent?
50
+ marker = config.verbose ? "\n-> ".green : ''
51
+ name = pod.top_specification.preferred_dependency ? "#{pod.top_specification.name}/#{pod.top_specification.preferred_dependency} (#{pod.top_specification.version})" : pod.to_s
52
+ puts marker << ( pod.exists? ? "Using #{name}" : "Installing #{name}".green )
53
+ end
54
+
55
+ unless pod.exists?
56
+ downloader = Downloader.for_pod(pod)
66
57
  downloader.download
67
- # TODO move cleaning into the installer as well
68
- downloader.clean(spec.expanded_clean_paths) if config.clean
58
+ # The docs need to be generated before cleaning because
59
+ # the documentation is created for all the subspecs.
60
+ generate_docs(pod)
61
+ pod.clean if config.clean
69
62
  end
70
63
  end
71
64
  end
72
65
 
66
+ #TODO: move to generator ?
67
+ def generate_docs(pod)
68
+ doc_generator = Generator::Documentation.new(pod)
69
+ if ( config.generate_docs? && !doc_generator.already_installed? )
70
+ puts "-> Installing documentation" if config.verbose?
71
+ doc_generator.generate(config.doc_install?)
72
+ else
73
+ puts "-> Using existing documentation" if config.verbose?
74
+ end
75
+ end
76
+
73
77
  def install!
74
- puts "Installing dependencies of: #{@podfile.defined_in_file}" if config.verbose?
75
- install_dependencies!
76
- root = config.project_pods_root
77
- headers_symlink_root = config.headers_symlink_root
78
+ @sandbox.prepare_for_install
78
79
 
79
- # Clean old header symlinks
80
- FileUtils.rm_r(headers_symlink_root, :secure => true) if File.exists?(headers_symlink_root)
80
+ print_title "Resolving dependencies of: #{@podfile.defined_in_file}"
81
+ specs_by_target
81
82
 
82
- puts "Generating support files" unless config.silent?
83
+ print_title "Installing dependencies"
84
+ install_dependencies!
85
+
86
+ print_title("Generating support files\n", false)
83
87
  target_installers.each do |target_installer|
84
- target_installer.install!
85
- target_installer.create_files_in(root)
88
+ pods_for_target = pods_by_target[target_installer.target_definition]
89
+ target_installer.install!(pods_for_target, @sandbox)
90
+ acknowledgements_path = target_installer.target_definition.acknowledgements_path
91
+ Generator::Acknowledgements.new(target_installer.target_definition,
92
+ pods_for_target).save_as(acknowledgements_path)
86
93
  end
87
- generate_lock_file!
88
94
 
89
- puts "* Running post install hooks" if config.verbose?
95
+ generate_lock_file!(specifications)
96
+ generate_dummy_source
97
+
98
+ puts "- Running post install hooks" if config.verbose?
90
99
  # Post install hooks run _before_ saving of project, so that they can alter it before saving.
100
+ run_post_install_hooks
101
+
102
+ puts "- Writing Xcode project file to `#{@sandbox.project_path}'\n\n" if config.verbose?
103
+ project.save_as(@sandbox.project_path)
104
+
105
+ UserProjectIntegrator.new(@podfile).integrate! if config.integrate_targets?
106
+ end
107
+
108
+ def run_post_install_hooks
109
+ # we loop over target installers instead of pods, because we yield the target installer
110
+ # to the spec post install hook.
91
111
  target_installers.each do |target_installer|
92
- target_installer.build_specifications.each { |spec| spec.post_install(target_installer) }
112
+ specs_by_target[target_installer.target_definition].each do |spec|
113
+ spec.post_install(target_installer)
114
+ end
93
115
  end
94
- @podfile.post_install!(self)
95
116
 
96
- projpath = File.join(root, 'Pods.xcodeproj')
97
- puts "* Writing Xcode project file to `#{projpath}'" if config.verbose?
98
- project.save_as(projpath)
117
+ @podfile.post_install!(self)
99
118
  end
100
119
 
101
- def generate_lock_file!
120
+ def generate_lock_file!(specs)
102
121
  lock_file.open('w') do |file|
103
122
  file.puts "PODS:"
104
- pods = build_specifications.map do |spec|
123
+
124
+ # Get list of [name, dependencies] pairs.
125
+ pod_and_deps = specs.map do |spec|
105
126
  [spec.to_s, spec.dependencies.map(&:to_s).sort]
106
- end.sort_by(&:first).each do |name, deps|
107
- if deps.empty?
108
- file.puts " - #{name}"
127
+ end.uniq
128
+
129
+ # Merge dependencies of ios and osx version of the same pod.
130
+ tmp = {}
131
+ pod_and_deps.each do |name, deps|
132
+ if tmp[name]
133
+ tmp[name].concat(deps).uniq!
109
134
  else
110
- file.puts " - #{name}:"
111
- deps.each { |dep| file.puts " - #{dep}" }
135
+ tmp[name] = deps
112
136
  end
113
137
  end
138
+ pod_and_deps = tmp
114
139
 
115
- unless download_only_specifications.empty?
116
- file.puts
117
- file.puts "DOWNLOAD_ONLY:"
118
- download_only_specifications.map(&:to_s).sort.each do |name|
140
+ # Sort by name and print
141
+ pod_and_deps.sort_by(&:first).each do |name, deps|
142
+ if deps.empty?
119
143
  file.puts " - #{name}"
144
+ else
145
+ file.puts " - #{name}:"
146
+ deps.each { |dep| file.puts " - #{dep}" }
120
147
  end
121
148
  end
122
149
 
@@ -128,55 +155,59 @@ module Pod
128
155
  end
129
156
  end
130
157
 
131
- # For now this assumes just one pods target, i.e. only libPods.a.
132
- # Not sure yet if we should try to be smart with apps that have multiple
133
- # targets and try to map pod targets to those app targets.
134
- #
135
- # Possible options are:
136
- # 1. Only cater to the most simple setup
137
- # 2. Try to automagically figure it out by name. For example, a pod target
138
- # called `:some_target' could map to an app target called `SomeTarget'.
139
- # (A variation would be to not even camelize the target name, but simply
140
- # let the user specify it with the proper case.)
141
- # 3. Let the user specify the app target name as an extra argument, but this
142
- # seems to be a less good version of the variation on #2.
143
- def configure_project(projpath)
144
- # TODO use more of Pathname’s API here
145
- root = File.dirname(projpath)
146
- xcworkspace = File.join(root, File.basename(projpath, '.xcodeproj') + '.xcworkspace')
147
- workspace = Xcodeproj::Workspace.new_from_xcworkspace(xcworkspace)
148
- pods_projpath = File.join(config.project_pods_root, 'Pods.xcodeproj')
149
- root = Pathname.new(root).expand_path
150
- [projpath, pods_projpath].each do |path|
151
- path = Pathname.new(path).expand_path.relative_path_from(root).to_s
152
- workspace << path unless workspace.include? path
153
- end
154
- workspace.save_as(xcworkspace)
158
+ def generate_dummy_source
159
+ filename = "PodsDummy.m"
160
+ pathname = Pathname.new(sandbox.root + filename)
161
+ Generator::DummySource.new.save_as(pathname)
155
162
 
156
- app_project = Xcodeproj::Project.new(projpath)
157
- return if app_project.files.find { |file| file.path =~ /libPods\.a$/ }
163
+ project_file = project.files.new('path' => filename)
164
+ project.group("Targets Support Files") << project_file
158
165
 
159
- configfile = app_project.files.new('path' => 'Pods/Pods.xcconfig')
160
- app_project.targets.each do |target|
161
- target.buildConfigurations.each do |config|
162
- config.baseConfiguration = configfile
163
- end
166
+ target_installers.each do |target_installer|
167
+ target_installer.target.source_build_phases.first << project_file
164
168
  end
165
-
166
- libfile = app_project.files.new_static_library('Pods')
167
- libfile.group = app_project.main_group.groups.find { |g| g.name == 'Frameworks' }
168
- app_project.objects.select_by_class(Xcodeproj::Project::PBXFrameworksBuildPhase).each do |build_phase|
169
- build_phase.files << libfile.buildFiles.new
169
+ end
170
+
171
+ def specs_by_target
172
+ @specs_by_target ||= @resolver.resolve
173
+ end
174
+
175
+ # @return [Array<Specification>] All dependencies that have been resolved.
176
+ def specifications
177
+ specs_by_target.values.flatten
178
+ end
179
+
180
+ # @return [Array<LocalPod>] A list of LocalPod instances for each
181
+ # dependency that is not a download-only one.
182
+ def pods
183
+ pods_by_target.values.flatten
184
+ end
185
+
186
+ def pods_by_target
187
+ @pods_by_spec = {}
188
+ result = {}
189
+ specs_by_target.each do |target_definition, specs|
190
+ @pods_by_spec[target_definition.platform] = {}
191
+ result[target_definition] = specs.map do |spec|
192
+ pod = pod_for_spec(spec, target_definition.platform)
193
+ pod.add_specification(spec)
194
+ pod
195
+ end.uniq.compact
170
196
  end
171
-
172
- copy_resources = app_project.add_shell_script_build_phase('Copy Pods Resources',
173
- %{"${SRCROOT}/Pods/Pods-resources.sh"\n})
174
- app_project.targets.each { |target| target.buildPhases << copy_resources }
175
-
176
- app_project.save_as(projpath)
177
-
178
- unless config.silent?
179
- puts "[!] From now on use `#{File.basename(xcworkspace)}' instead of `#{File.basename(projpath)}'."
197
+ result
198
+ end
199
+
200
+ def pod_for_spec(spec, platform)
201
+ @pods_by_spec[platform][spec.top_level_parent.name] ||= LocalPod.new(spec, @sandbox, platform)
202
+ end
203
+
204
+ private
205
+
206
+ def print_title(title, only_verbose = true)
207
+ if config.verbose?
208
+ puts "\n" + title.yellow
209
+ elsif !config.silent? && !only_verbose
210
+ puts title
180
211
  end
181
212
  end
182
213
  end
@@ -2,123 +2,118 @@ module Pod
2
2
  class Installer
3
3
  class TargetInstaller
4
4
  include Config::Mixin
5
- include Shared
6
5
 
7
- attr_reader :podfile, :project, :definition, :target
6
+ attr_reader :podfile, :project, :target_definition, :target
7
+ attr_accessor :requires_arc
8
8
 
9
- def initialize(podfile, project, definition)
10
- @podfile, @project, @definition = podfile, project, definition
9
+ def initialize(podfile, project, target_definition)
10
+ @podfile, @project, @target_definition = podfile, project, target_definition
11
11
  end
12
12
 
13
13
  def xcconfig
14
14
  @xcconfig ||= Xcodeproj::Config.new({
15
15
  # In a workspace this is where the static library headers should be found.
16
- 'PODS_ROOT' => '$(SRCROOT)/Pods',
17
- 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers"',
16
+ 'PODS_ROOT' => @target_definition.relative_pods_root,
18
17
  'ALWAYS_SEARCH_USER_PATHS' => 'YES', # needed to make EmbedReader build
19
- # This makes categories from static libraries work, which many libraries
20
- # require, so we add these by default.
21
- 'OTHER_LDFLAGS' => '-ObjC -all_load',
18
+ 'OTHER_LDFLAGS' => default_ld_flags,
22
19
  })
23
20
  end
24
21
 
25
- def xcconfig_filename
26
- "#{@definition.lib_name}.xcconfig"
22
+ def copy_resources_script_for(pods)
23
+ @copy_resources_script ||= Generator::CopyResourcesScript.new(pods.map { |p| p.resources }.flatten)
27
24
  end
28
25
 
29
- def copy_resources_script
30
- @copy_resources_script ||= Generator::CopyResourcesScript.new(build_specifications.map do |spec|
31
- spec.expanded_resources
26
+ def bridge_support_generator_for(pods, sandbox)
27
+ Generator::BridgeSupport.new(pods.map do |pod|
28
+ pod.header_files.map { |header| sandbox.root + header }
32
29
  end.flatten)
33
30
  end
34
31
 
35
- def copy_resources_filename
36
- "#{@definition.lib_name}-resources.sh"
37
- end
38
-
39
- def bridge_support_generator
40
- Generator::BridgeSupport.new(build_specifications.map do |spec|
41
- spec.header_files.map do |header|
42
- config.project_pods_root + header
43
- end
44
- end.flatten)
45
- end
46
-
47
- def bridge_support_filename
48
- "#{@definition.lib_name}.bridgesupport"
32
+ # TODO This has to be removed, but this means the specs have to be updated if they need a reference to the prefix header.
33
+ def prefix_header_filename
34
+ @target_definition.prefix_header_name
49
35
  end
50
36
 
51
37
  # TODO move out to Generator::PrefixHeader
52
- def save_prefix_header_as(pathname)
38
+ def save_prefix_header_as(pathname, pods)
53
39
  pathname.open('w') do |header|
54
40
  header.puts "#ifdef __OBJC__"
55
- header.puts "#import #{@podfile.platform == :ios ? '<UIKit/UIKit.h>' : '<Cocoa/Cocoa.h>'}"
41
+ header.puts "#import #{@target_definition.platform == :ios ? '<UIKit/UIKit.h>' : '<Cocoa/Cocoa.h>'}"
56
42
  header.puts "#endif"
43
+ pods.each do |pod|
44
+ if prefix_header_contents = pod.top_specification.prefix_header_contents
45
+ header.puts
46
+ header.puts prefix_header_contents
47
+ elsif prefix_header = pod.prefix_header_file
48
+ header.puts
49
+ header.puts prefix_header.read
50
+ end
51
+ end
57
52
  end
58
53
  end
59
54
 
60
- def prefix_header_filename
61
- "#{@definition.lib_name}-prefix.pch"
55
+ def target_support_files
56
+ [:copy_resources_script_name, :prefix_header_name, :xcconfig_name].map { |file| @target_definition.send(file) }
62
57
  end
63
58
 
64
59
  # TODO move xcconfig related code into the xcconfig method, like copy_resources_script and generate_bridge_support.
65
- def install!
66
- # First add the target to the project
67
- @target = @project.targets.new_static_library(@definition.lib_name)
68
-
69
- header_search_paths = []
70
- build_specifications.each do |spec|
71
- xcconfig.merge!(spec.xcconfig)
72
- # Only add implementation files to the compile phase
73
- spec.implementation_files.each do |file|
74
- @target.add_source_file(file, nil, spec.compiler_flags)
75
- end
76
- # Symlink header files to Pods/Headers
77
- spec.copy_header_mappings.each do |header_dir, files|
78
- target_dir = "#{config.headers_symlink_root}/#{header_dir}"
79
- FileUtils.mkdir_p(target_dir)
80
- target_dir_real_path = Pathname.new(target_dir).realpath
81
- files.each do |file|
82
- source = Pathname.new("#{config.project_pods_root}/#{file}").realpath.relative_path_from(target_dir_real_path)
83
- Dir.chdir(target_dir) do
84
- FileUtils.ln_sf(source, File.basename(file))
85
- end
86
- end
87
- end
88
- # Collect all header search paths
89
- header_search_paths.concat(spec.header_search_paths)
60
+ def install!(pods, sandbox)
61
+ self.requires_arc = pods.any? { |pod| pod.requires_arc? }
62
+
63
+ @target = @project.add_pod_target(@target_definition.label, @target_definition.platform)
64
+
65
+ pods.each do |pod|
66
+ xcconfig.merge!(pod.xcconfig)
67
+ pod.add_to_target(@target)
68
+
69
+ # TODO: this doesn't need to be done here, it has nothing to do with the target
70
+ pod.link_headers
90
71
  end
91
- xcconfig.merge!('HEADER_SEARCH_PATHS' => header_search_paths.sort.uniq.join(" "))
92
-
93
- # Add all the target related support files to the group, even the copy
94
- # resources script although the project doesn't actually use them.
95
- support_files_group = @project.groups.find do |group|
96
- group.name == "Targets Support Files"
97
- end.groups.new("name" => @definition.lib_name)
98
- support_files_group.files.new('path' => copy_resources_filename)
99
- prefix_file = support_files_group.files.new('path' => prefix_header_filename)
100
- xcconfig_file = support_files_group.files.new("path" => xcconfig_filename)
101
- # Assign the xcconfig as the base config of each config.
102
- @target.buildConfigurations.each do |config|
103
- config.baseConfiguration = xcconfig_file
104
- config.buildSettings['OTHER_LDFLAGS'] = ''
105
- config.buildSettings['GCC_PREFIX_HEADER'] = prefix_header_filename
106
- config.buildSettings['PODS_ROOT'] = '$(SRCROOT)'
72
+
73
+ xcconfig.merge!('HEADER_SEARCH_PATHS' => quoted(sandbox.header_search_paths).join(" "))
74
+
75
+ support_files_group = @project.group("Targets Support Files").create_group(@target_definition.label)
76
+ support_files_group.create_files(target_support_files)
77
+
78
+ xcconfig_file = support_files_group.files.where(:path => @target_definition.xcconfig_name)
79
+ configure_build_configurations(xcconfig_file)
80
+ create_files(pods, sandbox)
81
+ end
82
+
83
+ def configure_build_configurations(xcconfig_file)
84
+ @target.build_configurations.each do |config|
85
+ config.base_configuration = xcconfig_file
86
+ config.build_settings['OTHER_LDFLAGS'] = ''
87
+ config.build_settings['GCC_PREFIX_HEADER'] = @target_definition.prefix_header_name
88
+ config.build_settings['PODS_ROOT'] = '${SRCROOT}'
107
89
  end
108
90
  end
109
91
 
110
- def create_files_in(root)
92
+ def create_files(pods, sandbox)
111
93
  if @podfile.generate_bridge_support?
112
- puts "* Generating BridgeSupport metadata file at `#{root + bridge_support_filename}'" if config.verbose?
113
- bridge_support_generator.save_as(root + bridge_support_filename)
114
- copy_resources_script.resources << bridge_support_filename
94
+ bridge_support_metadata_path = sandbox.root + @target_definition.bridge_support_name
95
+ puts "- Generating BridgeSupport metadata file at `#{bridge_support_metadata_path}'" if config.verbose?
96
+ bridge_support_generator_for(pods, sandbox).save_as(bridge_support_metadata_path)
97
+ copy_resources_script_for(pods).resources << @target_definition.bridge_support_name
115
98
  end
116
- puts "* Generating xcconfig file at `#{root + xcconfig_filename}'" if config.verbose?
117
- xcconfig.save_as(root + xcconfig_filename)
118
- puts "* Generating prefix header at `#{root + prefix_header_filename}'" if config.verbose?
119
- save_prefix_header_as(root + prefix_header_filename)
120
- puts "* Generating copy resources script at `#{root + copy_resources_filename}'" if config.verbose?
121
- copy_resources_script.save_as(root + copy_resources_filename)
99
+ puts "- Generating xcconfig file at `#{sandbox.root + @target_definition.xcconfig_name}'" if config.verbose?
100
+ xcconfig.save_as(sandbox.root + @target_definition.xcconfig_name)
101
+ puts "- Generating prefix header at `#{sandbox.root + @target_definition.prefix_header_name}'" if config.verbose?
102
+ save_prefix_header_as(sandbox.root + @target_definition.prefix_header_name, pods)
103
+ puts "- Generating copy resources script at `#{sandbox.root + @target_definition.copy_resources_script_name}'" if config.verbose?
104
+ copy_resources_script_for(pods).save_as(sandbox.root + @target_definition.copy_resources_script_name)
105
+ end
106
+
107
+ private
108
+
109
+ def quoted(strings)
110
+ strings.map { |s| "\"#{s}\"" }
111
+ end
112
+
113
+ def default_ld_flags
114
+ flags = %w{-ObjC}
115
+ flags << '-fobjc-arc' if @podfile.set_arc_compatibility_flag? && self.requires_arc
116
+ flags.join(" ")
122
117
  end
123
118
  end
124
119
  end