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.
- data/CHANGELOG.md +229 -2
- data/README.md +50 -20
- data/bin/pod +3 -2
- data/lib/cocoapods.rb +23 -9
- data/lib/cocoapods/command.rb +71 -30
- data/lib/cocoapods/command/error_report.rb +102 -0
- data/lib/cocoapods/command/install.rb +27 -19
- data/lib/cocoapods/command/list.rb +51 -8
- data/lib/cocoapods/command/presenter.rb +61 -0
- data/lib/cocoapods/command/presenter/cocoa_pod.rb +123 -0
- data/lib/cocoapods/command/push.rb +102 -0
- data/lib/cocoapods/command/repo.rb +70 -14
- data/lib/cocoapods/command/search.rb +7 -10
- data/lib/cocoapods/command/setup.rb +76 -15
- data/lib/cocoapods/command/spec.rb +581 -97
- data/lib/cocoapods/config.rb +23 -26
- data/lib/cocoapods/dependency.rb +86 -40
- data/lib/cocoapods/downloader.rb +30 -18
- data/lib/cocoapods/downloader/git.rb +125 -15
- data/lib/cocoapods/downloader/http.rb +73 -0
- data/lib/cocoapods/downloader/mercurial.rb +3 -9
- data/lib/cocoapods/downloader/subversion.rb +3 -9
- data/lib/cocoapods/executable.rb +26 -3
- data/lib/cocoapods/generator/acknowledgements.rb +37 -0
- data/lib/cocoapods/generator/acknowledgements/markdown.rb +38 -0
- data/lib/cocoapods/generator/acknowledgements/plist.rb +63 -0
- data/lib/cocoapods/generator/copy_resources_script.rb +8 -4
- data/lib/cocoapods/generator/documentation.rb +99 -0
- data/lib/cocoapods/generator/dummy_source.rb +14 -0
- data/lib/cocoapods/installer.rb +140 -109
- data/lib/cocoapods/installer/target_installer.rb +78 -83
- data/lib/cocoapods/installer/user_project_integrator.rb +162 -0
- data/lib/cocoapods/local_pod.rb +240 -0
- data/lib/cocoapods/platform.rb +41 -18
- data/lib/cocoapods/podfile.rb +234 -21
- data/lib/cocoapods/project.rb +67 -0
- data/lib/cocoapods/resolver.rb +62 -32
- data/lib/cocoapods/sandbox.rb +63 -0
- data/lib/cocoapods/source.rb +42 -20
- data/lib/cocoapods/specification.rb +294 -271
- data/lib/cocoapods/specification/set.rb +10 -28
- data/lib/cocoapods/specification/statistics.rb +112 -0
- metadata +124 -11
- data/lib/cocoapods/xcodeproj_pods.rb +0 -111
data/lib/cocoapods/installer.rb
CHANGED
@@ -1,28 +1,21 @@
|
|
1
|
+
require 'colored'
|
2
|
+
|
1
3
|
module Pod
|
2
4
|
class Installer
|
3
|
-
autoload :TargetInstaller,
|
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
|
-
|
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 =
|
35
|
-
|
36
|
-
|
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(
|
41
|
-
|
42
|
-
group.
|
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
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
puts
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
downloader = Downloader.
|
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
|
-
#
|
68
|
-
|
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
|
-
|
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
|
-
|
80
|
-
|
80
|
+
print_title "Resolving dependencies of: #{@podfile.defined_in_file}"
|
81
|
+
specs_by_target
|
81
82
|
|
82
|
-
|
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.
|
85
|
-
target_installer.
|
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
|
-
|
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.
|
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
|
-
|
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
|
-
|
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.
|
107
|
-
|
108
|
-
|
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
|
-
|
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
|
-
|
116
|
-
|
117
|
-
|
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
|
-
|
132
|
-
|
133
|
-
|
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
|
-
|
157
|
-
|
163
|
+
project_file = project.files.new('path' => filename)
|
164
|
+
project.group("Targets Support Files") << project_file
|
158
165
|
|
159
|
-
|
160
|
-
|
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
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
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
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
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, :
|
6
|
+
attr_reader :podfile, :project, :target_definition, :target
|
7
|
+
attr_accessor :requires_arc
|
8
8
|
|
9
|
-
def initialize(podfile, project,
|
10
|
-
@podfile, @project, @
|
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'
|
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
|
-
|
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
|
26
|
-
|
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
|
30
|
-
|
31
|
-
|
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
|
-
|
36
|
-
|
37
|
-
|
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 #{@
|
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
|
61
|
-
|
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
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
xcconfig.merge!(
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
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
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
support_files_group
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
config.
|
105
|
-
config.
|
106
|
-
config.
|
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
|
92
|
+
def create_files(pods, sandbox)
|
111
93
|
if @podfile.generate_bridge_support?
|
112
|
-
|
113
|
-
|
114
|
-
|
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 "
|
117
|
-
xcconfig.save_as(root +
|
118
|
-
puts "
|
119
|
-
save_prefix_header_as(root +
|
120
|
-
puts "
|
121
|
-
|
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
|