cocoapods 0.16.4 → 0.17.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +108 -0
  3. data/README.md +3 -3
  4. data/bin/pod +1 -1
  5. data/lib/cocoapods.rb +31 -31
  6. data/lib/cocoapods/command.rb +62 -107
  7. data/lib/cocoapods/command/inter_process_communication.rb +103 -0
  8. data/lib/cocoapods/command/list.rb +45 -44
  9. data/lib/cocoapods/command/outdated.rb +28 -25
  10. data/lib/cocoapods/command/project.rb +90 -0
  11. data/lib/cocoapods/command/push.rb +50 -32
  12. data/lib/cocoapods/command/repo.rb +125 -155
  13. data/lib/cocoapods/command/search.rb +23 -12
  14. data/lib/cocoapods/command/setup.rb +103 -64
  15. data/lib/cocoapods/command/spec.rb +329 -90
  16. data/lib/cocoapods/config.rb +197 -44
  17. data/lib/cocoapods/downloader.rb +47 -34
  18. data/lib/cocoapods/executable.rb +98 -41
  19. data/lib/cocoapods/external_sources.rb +325 -0
  20. data/lib/cocoapods/file_list.rb +8 -1
  21. data/lib/cocoapods/gem_version.rb +7 -0
  22. data/lib/cocoapods/generator/acknowledgements.rb +71 -7
  23. data/lib/cocoapods/generator/acknowledgements/markdown.rb +10 -9
  24. data/lib/cocoapods/generator/acknowledgements/plist.rb +9 -8
  25. data/lib/cocoapods/generator/copy_resources_script.rb +2 -2
  26. data/lib/cocoapods/generator/documentation.rb +153 -37
  27. data/lib/cocoapods/generator/prefix_header.rb +82 -0
  28. data/lib/cocoapods/generator/target_header.rb +58 -0
  29. data/lib/cocoapods/generator/xcconfig.rb +130 -0
  30. data/lib/cocoapods/hooks/installer_representation.rb +123 -0
  31. data/lib/cocoapods/hooks/library_representation.rb +79 -0
  32. data/lib/cocoapods/hooks/pod_representation.rb +74 -0
  33. data/lib/cocoapods/installer.rb +398 -147
  34. data/lib/cocoapods/installer/analyzer.rb +556 -0
  35. data/lib/cocoapods/installer/analyzer/sandbox_analyzer.rb +253 -0
  36. data/lib/cocoapods/installer/file_references_installer.rb +179 -0
  37. data/lib/cocoapods/installer/pod_source_installer.rb +289 -0
  38. data/lib/cocoapods/installer/target_installer.rb +307 -112
  39. data/lib/cocoapods/installer/user_project_integrator.rb +140 -176
  40. data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +193 -0
  41. data/lib/cocoapods/library.rb +195 -0
  42. data/lib/cocoapods/open_uri.rb +16 -14
  43. data/lib/cocoapods/project.rb +175 -52
  44. data/lib/cocoapods/resolver.rb +151 -164
  45. data/lib/cocoapods/sandbox.rb +276 -54
  46. data/lib/cocoapods/sandbox/file_accessor.rb +210 -0
  47. data/lib/cocoapods/sandbox/headers_store.rb +96 -0
  48. data/lib/cocoapods/sandbox/path_list.rb +178 -0
  49. data/lib/cocoapods/sources_manager.rb +218 -0
  50. data/lib/cocoapods/user_interface.rb +82 -18
  51. data/lib/cocoapods/{command → user_interface}/error_report.rb +5 -5
  52. data/lib/cocoapods/validator.rb +379 -0
  53. metadata +74 -55
  54. data/lib/cocoapods/command/install.rb +0 -55
  55. data/lib/cocoapods/command/linter.rb +0 -317
  56. data/lib/cocoapods/command/update.rb +0 -25
  57. data/lib/cocoapods/dependency.rb +0 -285
  58. data/lib/cocoapods/downloader/git.rb +0 -276
  59. data/lib/cocoapods/downloader/http.rb +0 -99
  60. data/lib/cocoapods/downloader/mercurial.rb +0 -26
  61. data/lib/cocoapods/downloader/subversion.rb +0 -42
  62. data/lib/cocoapods/local_pod.rb +0 -620
  63. data/lib/cocoapods/lockfile.rb +0 -274
  64. data/lib/cocoapods/platform.rb +0 -127
  65. data/lib/cocoapods/podfile.rb +0 -551
  66. data/lib/cocoapods/source.rb +0 -223
  67. data/lib/cocoapods/specification.rb +0 -579
  68. data/lib/cocoapods/specification/set.rb +0 -175
  69. data/lib/cocoapods/specification/statistics.rb +0 -112
  70. data/lib/cocoapods/user_interface/ui_pod.rb +0 -130
  71. data/lib/cocoapods/version.rb +0 -26
@@ -1,176 +1,371 @@
1
1
  module Pod
2
2
  class Installer
3
3
 
4
- # This class is reponsible of creating and configuring the static library
5
- # target in Pods project. Every target is generated from a target
6
- # definition of the Podfile.
4
+ # Controller class responsible of creating and configuring the static
5
+ # library target in Pods project. It also creates the support file needed
6
+ # by the target.
7
7
  #
8
8
  class TargetInstaller
9
- include Config::Mixin
10
9
 
11
- # @return [Podfile]
10
+ # @return [Sandbox] sandbox the sandbox where the support files should
11
+ # be generated.
12
12
  #
13
- # TODO: is really needed to pass the podfile?
13
+ attr_reader :sandbox
14
+
15
+ # @return [Library] The library whose target needs to be generated.
14
16
  #
15
- attr_reader :podfile
17
+ attr_reader :library
16
18
 
17
- # @return [Project] The Pods project.
19
+ # @param [Project] project @see project
20
+ # @param [Library] library @see library
18
21
  #
19
- attr_reader :project
22
+ def initialize(sandbox, library)
23
+ @sandbox = sandbox
24
+ @library = library
25
+ end
20
26
 
21
- # @return [TargetDefinition] The target definition whoose target needs to
22
- # be generated.
27
+ # Creates the target in the Pods project and the relative support files.
28
+ #
29
+ # @return [void]
23
30
  #
24
- attr_reader :target_definition
31
+ def install!
32
+ UI.message "- Installing target `#{library.name}` #{library.platform}" do
33
+ add_target
34
+ add_files_to_build_phases
35
+ create_suport_files_group
25
36
 
26
- def initialize(podfile, project, target_definition)
27
- @podfile = podfile
28
- @project = project
29
- @target_definition = target_definition
37
+ create_xcconfig_file
38
+ create_target_header
39
+ create_prefix_header
40
+ create_bridge_support_file
41
+ create_copy_resources_script
42
+ create_acknowledgements
43
+ create_dummy_source
44
+ end
30
45
  end
31
46
 
32
- # @return [void] Creates the target in the Pods project and its support
33
- # files.
47
+ #-----------------------------------------------------------------------#
48
+
49
+ private
50
+
51
+ # @!group Installation steps
52
+
53
+ # Adds the target for the library to the Pods project with the
54
+ # appropriate build configurations.
55
+ #
56
+ # @note The `PODS_HEADERS_SEARCH_PATHS` overrides the xcconfig.
34
57
  #
35
- # @param [Array<LocalPod>] pods The pods are required by the target
36
- # definition of this installer.
58
+ # @todo Add integration test for build configurations and don't add the
59
+ # build configurations to the project if they are not needed.
37
60
  #
38
- # @param [Sandbox] sandbox The sanbox where the support files
39
- # should be generated.
61
+ # @return [void]
40
62
  #
41
- def install!(pods, sandbox)
42
- self.requires_arc = pods.any? { |pod| pod.requires_arc? }
63
+ def add_target
64
+ name = library.label
65
+ platform = library.platform.name
66
+ deployment_target = library.platform.deployment_target.to_s
67
+ @target = project.new_target(:static_library, name, platform, deployment_target)
43
68
 
44
- @target = @project.add_pod_target(@target_definition.label, @target_definition.platform)
69
+ settings = {}
70
+ if library.platform.requires_legacy_ios_archs?
71
+ settings['ARCHS'] = "armv6 armv7"
72
+ end
73
+ if target_definition.inhibit_all_warnings?
74
+ settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = 'YES'
75
+ end
45
76
 
46
- source_file_descriptions = []
47
- pods.each { |p| p.add_build_files_to_target(@target) }
77
+ @target.build_settings('Debug').merge!(settings)
78
+ @target.build_settings('Release').merge!(settings)
48
79
 
49
- support_files_group = @project.support_files_group.new_group(@target_definition.label)
50
- target_support_files.each { |path| support_files_group.new_file(path) }
80
+ library.user_build_configurations.each do |lib_name, type|
81
+ unless @target.build_configurations.map(&:name).include?(lib_name)
82
+ build_config = project.new(Xcodeproj::Project::XCBuildConfiguration)
83
+ build_config.name = lib_name
84
+ settings = @target.build_settings(type.to_s.capitalize)
85
+ build_config.build_settings = settings
86
+ target.build_configurations << build_config
87
+ project.build_configurations << build_config
88
+ end
89
+ end
51
90
 
52
- xcconfig_file = support_files_group.files.find { |f| f.path == @target_definition.xcconfig_name }
53
- configure_build_configurations(xcconfig_file, sandbox)
54
- create_files(pods, sandbox)
91
+ library.target = @target
55
92
  end
56
93
 
57
- # @return [PBXNativeTarget] The target generated by the installation
58
- # process.
59
- #
60
- attr_reader :target
61
-
94
+ ENABLE_OBJECT_USE_OBJC_FROM = {
95
+ :ios => Version.new('6'),
96
+ :osx => Version.new('10.8')
97
+ }
62
98
 
63
- # @return [Boold] Wether the any of the pods requires arc.
99
+ # Adds the build files of the pods to the target and adds a reference to
100
+ # the frameworks of the Pods.
64
101
  #
65
- # TODO: This should not be an attribute reader.
102
+ # @note The Frameworks are used only for presentation purposes as the
103
+ # xcconfig is the authoritative source about their information.
66
104
  #
67
- attr_accessor :requires_arc
68
-
69
- attr_reader :xcconfig
70
-
71
- # In a workspace this is where the static library headers should be found.
105
+ # @return [void]
72
106
  #
73
- def generate_xcconfig(pods, sandbox)
74
- xcconfig = Xcodeproj::Config.new({
75
- 'ALWAYS_SEARCH_USER_PATHS' => 'YES', # needed to make EmbedReader build
76
- 'OTHER_LDFLAGS' => default_ld_flags,
77
- 'HEADER_SEARCH_PATHS' => '${PODS_HEADERS_SEARCH_PATHS}',
78
- # CocoaPods global keys
79
- 'PODS_ROOT' => @target_definition.relative_pods_root,
80
- 'PODS_BUILD_HEADERS_SEARCH_PATHS' => quoted(sandbox.build_headers.search_paths).join(" "),
81
- 'PODS_PUBLIC_HEADERS_SEARCH_PATHS' => quoted(sandbox.public_headers.search_paths).join(" "),
82
- # Pods project specific keys
83
- 'PODS_HEADERS_SEARCH_PATHS' => '${PODS_PUBLIC_HEADERS_SEARCH_PATHS}'
84
- })
85
- pods.each { |pod| xcconfig.merge!(pod.xcconfig) }
86
- @xcconfig = xcconfig
107
+ def add_files_to_build_phases
108
+ UI.message "- Adding Build files" do
109
+ library.file_accessors.each do |file_accessor|
110
+ consumer = file_accessor.spec_consumer
111
+ flags = compiler_flags_for_consumer(consumer)
112
+ source_files = file_accessor.source_files
113
+ file_refs = source_files.map { |sf| project.file_reference(sf) }
114
+ target.add_file_references(file_refs, flags)
115
+
116
+ file_accessor.spec_consumer.frameworks.each do |framework|
117
+ project.add_system_framework(framework, target)
118
+ end
119
+ end
120
+ end
87
121
  end
88
122
 
123
+ # Creates the group that holds the references to the support files
124
+ # generated by this installer.
89
125
  #
126
+ # @return [void]
90
127
  #
91
- def copy_resources_script_for(pods)
92
- @copy_resources_script ||= Generator::CopyResourcesScript.new(pods.map { |p| p.relative_resource_files }.flatten)
128
+ def create_suport_files_group
129
+ name = target_definition.label
130
+ @support_files_group = project.support_files_group.new_group(name)
93
131
  end
94
132
 
95
- def bridge_support_generator_for(pods, sandbox)
96
- Generator::BridgeSupport.new(pods.map do |pod|
97
- pod.relative_header_files.map { |header| sandbox.root + header }
98
- end.flatten)
99
- end
133
+ #--------------------------------------#
100
134
 
101
- # TODO This has to be removed, but this means the specs have to be updated if they need a reference to the prefix header.
102
- def prefix_header_filename
103
- @target_definition.prefix_header_name
104
- end
135
+ # Generates the contents of the xcconfig file and saves it to disk.
136
+ #
137
+ # @note The `ALWAYS_SEARCH_USER_PATHS` flag is enabled to support
138
+ # libraries like `EmbedReader`.
139
+ #
140
+ # @return [void]
141
+ #
142
+ def create_xcconfig_file
143
+ path = library.xcconfig_path
144
+ UI.message "- Generating xcconfig file at #{UI.path(path)}" do
145
+ gen = Generator::XCConfig.new(sandbox, spec_consumers, library.relative_pods_root)
146
+ gen.set_arc_compatibility_flag = target_definition.podfile.set_arc_compatibility_flag?
147
+ gen.save_as(path)
148
+ library.xcconfig = gen.xcconfig
149
+ xcconfig_file_ref = add_file_to_support_group(path)
105
150
 
106
- # TODO move out to Generator::PrefixHeader
107
- def save_prefix_header_as(pathname, pods)
108
- pathname.open('w') do |header|
109
- header.puts "#ifdef __OBJC__"
110
- header.puts "#import #{@target_definition.platform == :ios ? '<UIKit/UIKit.h>' : '<Cocoa/Cocoa.h>'}"
111
- header.puts "#endif"
112
- pods.each do |pod|
113
- if prefix_header_contents = pod.top_specification.prefix_header_contents
114
- header.puts
115
- header.puts prefix_header_contents
116
- elsif prefix_header = pod.prefix_header_file
117
- header.puts
118
- header.puts prefix_header.read
151
+ target.build_configurations.each do |c|
152
+ c.base_configuration_reference = xcconfig_file_ref
153
+ Generator::XCConfig.pods_project_settings.each do |key, value|
154
+ c.build_settings[key] = value
119
155
  end
120
156
  end
121
157
  end
122
158
  end
123
159
 
124
- def target_support_files
125
- [:copy_resources_script_name, :prefix_header_name, :xcconfig_name].map { |file| @target_definition.send(file) }
160
+ # Generates a header which allows to inspect at compile time the installed
161
+ # pods and the installed specifications of a pod.
162
+ #
163
+ def create_target_header
164
+ path = library.target_header_path
165
+ UI.message "- Generating target header at #{UI.path(path)}" do
166
+ generator = Generator::TargetHeader.new(library.specs)
167
+ generator.save_as(path)
168
+ add_file_to_support_group(path)
169
+ end
126
170
  end
127
171
 
128
- def configure_build_configurations(xcconfig_file, sandbox)
129
- @target.build_configurations.each do |config|
130
- config.base_configuration_reference = xcconfig_file
131
- config.build_settings['OTHER_LDFLAGS'] = ''
132
- config.build_settings['GCC_PREFIX_HEADER'] = @target_definition.prefix_header_name
133
- config.build_settings['PODS_ROOT'] = '${SRCROOT}'
134
- config.build_settings['PODS_HEADERS_SEARCH_PATHS'] = '${PODS_BUILD_HEADERS_SEARCH_PATHS}'
135
- config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = @target_definition.inhibit_all_warnings? ? 'YES' : 'NO'
172
+ # Creates a prefix header file which imports `UIKit` or `Cocoa` according
173
+ # to the platform of the target. This file also include any prefix header
174
+ # content reported by the specification of the pods.
175
+ #
176
+ # @return [void]
177
+ #
178
+ def create_prefix_header
179
+ path = library.prefix_header_path
180
+ UI.message "- Generating prefix header at #{UI.path(path)}" do
181
+ generator = Generator::PrefixHeader.new(library.file_accessors, library.platform)
182
+ generator.imports << library.target_header_path.basename
183
+ generator.save_as(path)
184
+ add_file_to_support_group(path)
185
+
186
+ target.build_configurations.each do |c|
187
+ relative_path = path.relative_path_from(sandbox.root)
188
+ c.build_settings['GCC_PREFIX_HEADER'] = relative_path.to_s
189
+ end
136
190
  end
137
191
  end
138
192
 
193
+ # Generates the bridge support metadata if requested by the {Podfile}.
139
194
  #
195
+ # @note The bridge support metadata is added to the resources of the
196
+ # library because it is needed for environments interpreted at
197
+ # runtime.
140
198
  #
141
- def create_files(pods, sandbox)
142
- bridge_support_metadata_path = sandbox.root + @target_definition.bridge_support_name
143
- UI.message "- Generating BridgeSupport metadata file at #{UI.path bridge_support_metadata_path}" do
144
- bridge_support_generator_for(pods, sandbox).save_as(bridge_support_metadata_path)
145
- copy_resources_script_for(pods).resources << @target_definition.bridge_support_name
146
- end if @podfile.generate_bridge_support?
199
+ # @return [void]
200
+ #
201
+ def create_bridge_support_file
202
+ if target_definition.podfile.generate_bridge_support?
203
+ path = library.bridge_support_path
204
+ UI.message "- Generating BridgeSupport metadata at #{UI.path(path)}" do
205
+ headers = target.headers_build_phase.files.map { |bf| sandbox.root + bf.file_ref.path }
206
+ generator = Generator::BridgeSupport.new(headers)
207
+ generator.save_as(path)
208
+ add_file_to_support_group(path)
209
+ @bridge_support_file = path.relative_path_from(sandbox.root)
210
+ end
211
+ end
212
+ end
147
213
 
148
- UI.message "- Generating xcconfig file at #{UI.path(sandbox.root + @target_definition.xcconfig_name)}" do
149
- generate_xcconfig(pods, sandbox)
150
- xcconfig.save_as(sandbox.root + @target_definition.xcconfig_name)
151
- @target_definition.xcconfig = xcconfig
214
+ # Creates a script that copies the resources to the bundle of the client
215
+ # target.
216
+ #
217
+ # @note The bridge support file needs to be created before the prefix
218
+ # header, otherwise it will not be added to the resources script.
219
+ #
220
+ # @return [void]
221
+ #
222
+ def create_copy_resources_script
223
+ path = library.copy_resources_script_path
224
+ UI.message "- Generating copy resources script at #{UI.path(path)}" do
225
+ resources = library.file_accessors.map { |accessor| accessor.resources.flatten.map {|res| project.relativize(res)} }.flatten
226
+ resources << bridge_support_file if bridge_support_file
227
+ generator = Generator::CopyResourcesScript.new(resources)
228
+ generator.save_as(path)
229
+ add_file_to_support_group(path)
152
230
  end
231
+ end
153
232
 
154
- UI.message "- Generating prefix header at #{UI.path(sandbox.root + @target_definition.prefix_header_name)}" do
155
- save_prefix_header_as(sandbox.root + @target_definition.prefix_header_name, pods)
233
+ # Generates the acknowledgement files (markdown and plist) for the target.
234
+ #
235
+ # @return [void]
236
+ #
237
+ def create_acknowledgements
238
+ basepath = library.acknowledgements_basepath
239
+ Generator::Acknowledgements.generators.each do |generator_class|
240
+ path = generator_class.path_from_basepath(basepath)
241
+ UI.message "- Generating acknowledgements at #{UI.path(path)}" do
242
+ generator = generator_class.new(library.file_accessors)
243
+ generator.save_as(path)
244
+ add_file_to_support_group(path)
245
+ end
156
246
  end
247
+ end
157
248
 
158
- UI.message "- Generating copy resources script at #{UI.path(sandbox.root + @target_definition.copy_resources_script_name)}" do
159
- copy_resources_script_for(pods).save_as(sandbox.root + @target_definition.copy_resources_script_name)
249
+ # Generates a dummy source file for each target so libraries that contain
250
+ # only categories build.
251
+ #
252
+ # @return [void]
253
+ #
254
+ def create_dummy_source
255
+ path = library.dummy_source_path
256
+ UI.message "- Generating dummy source file at #{UI.path(path)}" do
257
+ generator = Generator::DummySource.new(library.label)
258
+ generator.save_as(path)
259
+ file_reference = add_file_to_support_group(path)
260
+ target.source_build_phase.add_file_reference(file_reference)
160
261
  end
161
262
  end
162
263
 
264
+ #-----------------------------------------------------------------------#
265
+
163
266
  private
164
267
 
165
- def quoted(strings)
166
- strings.map { |s| "\"#{s}\"" }
268
+ # @return [PBXNativeTarget] the target generated by the installation
269
+ # process.
270
+ #
271
+ # @note Generated by the {#add_target} step.
272
+ #
273
+ attr_reader :target
274
+
275
+ # @!group Private helpers.
276
+
277
+ # @return [Project] the Pods project of the sandbox.
278
+ #
279
+ def project
280
+ sandbox.project
281
+ end
282
+
283
+ # @return [TargetDefinition] the target definition of the library.
284
+ #
285
+ def target_definition
286
+ library.target_definition
167
287
  end
168
288
 
169
- def default_ld_flags
170
- flags = %w{-ObjC}
171
- flags << '-fobjc-arc' if @podfile.set_arc_compatibility_flag? && self.requires_arc
172
- flags.join(" ")
289
+ # @return [Specification::Consumer] the consumer for the specifications.
290
+ #
291
+ def spec_consumers
292
+ @spec_consumers ||= library.file_accessors.map(&:spec_consumer)
173
293
  end
294
+
295
+ # @return [PBXGroup] the group where the file references to the support
296
+ # files should be stored.
297
+ #
298
+ attr_reader :support_files_group
299
+
300
+ # @return [Pathname] the path of the bridge support file relative to the
301
+ # sandbox.
302
+ #
303
+ # @return [Nil] if no bridge support file was generated.
304
+ #
305
+ attr_reader :bridge_support_file
306
+
307
+ # Adds a reference to the given file in the support group of this target.
308
+ #
309
+ # @param [Pathname] path
310
+ # The path of the file to which the reference should be added.
311
+ #
312
+ # @return [PBXFileReference] the file reference of the added file.
313
+ #
314
+ def add_file_to_support_group(path)
315
+ relative_path = path.relative_path_from(sandbox.root)
316
+ support_files_group.new_file(relative_path)
317
+ end
318
+
319
+ # Returns the compiler flags for the source files of the given specification.
320
+ #
321
+ # The following behavior is regarding the `OS_OBJECT_USE_OBJC` flag. When
322
+ # set to `0`, it will allow code to use `dispatch_release()` on >= iOS 6.0
323
+ # and OS X 10.8.
324
+ #
325
+ # * New libraries that do *not* require ARC don’t need to care about this
326
+ # issue at all.
327
+ #
328
+ # * New libraries that *do* require ARC _and_ have a deployment target of
329
+ # >= iOS 6.0 or OS X 10.8:
330
+ #
331
+ # These no longer use `dispatch_release()` and should *not* have the
332
+ # `OS_OBJECT_USE_OBJC` flag set to `0`.
333
+ #
334
+ # **Note:** this means that these libraries *have* to specify the
335
+ # deployment target in order to function well.
336
+ #
337
+ # * New libraries that *do* require ARC, but have a deployment target of
338
+ # < iOS 6.0 or OS X 10.8:
339
+ #
340
+ # These contain `dispatch_release()` calls and as such need the
341
+ # `OS_OBJECT_USE_OBJC` flag set to `1`.
342
+ #
343
+ # **Note:** libraries that do *not* specify a platform version are
344
+ # assumed to have a deployment target of < iOS 6.0 or OS X 10.8.
345
+ #
346
+ # For more information, see: http://opensource.apple.com/source/libdispatch/libdispatch-228.18/os/object.h
347
+ #
348
+ # @param [Specification::Consumer] consumer
349
+ # The consumer for the specification for which the compiler flags
350
+ # are needed.
351
+ #
352
+ # @return [String] The compiler flags.
353
+ #
354
+ def compiler_flags_for_consumer(consumer)
355
+ flags = consumer.compiler_flags.dup
356
+ if consumer.requires_arc
357
+ flags << '-fobjc-arc'
358
+ platform_name = consumer.platform_name
359
+ spec_deployment_target = consumer.spec.deployment_target(platform_name)
360
+ if spec_deployment_target.nil? || Version.new(spec_deployment_target) < ENABLE_OBJECT_USE_OBJC_FROM[platform_name]
361
+ flags << '-DOS_OBJECT_USE_OBJC=0'
362
+ end
363
+ end
364
+ flags = flags * " "
365
+ end
366
+
367
+ #-----------------------------------------------------------------------#
368
+
174
369
  end
175
370
  end
176
371
  end