cocoapods 1.1.0.beta.1 → 1.1.0.beta.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 874ef7ca85409e240f67902b93426a61624b351f
4
- data.tar.gz: 9ba454d15e64fdaa7fc0902120e93b9fe1fd86ec
3
+ metadata.gz: 418a08b4640dea3a24c182ef13b27429b38cb4ff
4
+ data.tar.gz: e741431690118b0f7cb25eec97cc4e2fe21f466b
5
5
  SHA512:
6
- metadata.gz: d5bbc9deebcd172a88456e21ee536aedb983383e287acafbf4481949980715139d5e673c0d18ecc10988e1521c59c3c710a7130ade7c405fd4a4a63ec3681fc1
7
- data.tar.gz: b9510b26eb4290ececc726cfd68f9fc22a6e6127bd6ae54907e50f6959f82ddef552e85d29007936603f4f2b66b40dd808597fcf93ecd0f76ad501b3fa6dae00
6
+ metadata.gz: 671ae461b6646fbd4e683c93515f7a4b362502910f375bb41979ab3772c9f4ec07e27f3b1fab4004365eb7e3e33b94feb741ed24473afe143b49c72d602c5e84
7
+ data.tar.gz: 8ad878152d902904f0da3817dc4d0353194c6d68fbd279b8d86fed4f9276cd2d72d15e56b90ff5114cc05d6ddb3539b4e8da1f895e40e1c9b0ef39823c8635ab
@@ -4,6 +4,53 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
4
4
 
5
5
  To install release candidates run `[sudo] gem install cocoapods --pre`
6
6
 
7
+ ## 1.1.0.beta.2 (2016-09-03)
8
+
9
+ ##### Enhancements
10
+
11
+ * Remove references to the pre-1.0 Migrator.
12
+ [Danielle Tomlinson](https://github.com/dantoml)
13
+ [#5635](https://github.com/CocoaPods/CocoaPods/pull/5635)
14
+
15
+ * Improve performance of dependency resolution.
16
+ [yanzhiwei147](https://github.com/yanzhiwei147)
17
+ [#5510](https://github.com/CocoaPods/CocoaPods/pull/5510)
18
+
19
+ * Add support for building Messages applications.
20
+ [benasher44](https://github.com/benasher44)
21
+ [#5726](https://github.com/CocoaPods/CocoaPods/pull/5726)
22
+
23
+ * Improved messaging when missing host targets for embedded targets.
24
+ Improved support for framework-only projects.
25
+ [benasher44](https://github.com/benasher44)
26
+ [#5733](https://github.com/CocoaPods/CocoaPods/pull/5733)
27
+
28
+ * Set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES when appropriate.
29
+ [benasher44](https://github.com/benasher44)
30
+ [#5732](https://github.com/CocoaPods/CocoaPods/pull/5732)
31
+
32
+ * Verify that embedded target platform and swift version matches the host.
33
+ [benasher44](https://github.com/benasher44)
34
+ [#5747](https://github.com/CocoaPods/CocoaPods/pull/5747)
35
+
36
+ ##### Bug Fixes
37
+
38
+ * Hash scope suffixes if they are over 50 characters to prevent file paths from being too long.
39
+ [Danielle Tomlinson](https://github.com/dantoml)
40
+ [#5491](https://github.com/CocoaPods/CocoaPods/issues/5491)
41
+
42
+ * Fix codesigning identity on watchOS and tvOS targets.
43
+ [Danielle Tomlinson](https://github.com/dantoml)
44
+ [#5686](https://github.com/CocoaPods/CocoaPods/issues/5686)
45
+
46
+ * Fix SWIFT_VERSION not being read when only defined at the project level.
47
+ [Ben Asher](https://github.com/benasher44)
48
+ [#5700](https://github.com/CocoaPods/CocoaPods/issues/5700) and [#5737](https://github.com/CocoaPods/CocoaPods/issues/5737)
49
+
50
+ * Fix analyzer checking the compatibility of an embedded target with a host that has not been added the Podfile.
51
+ [Ben Asher](https://github.com/benasher44)
52
+ [#5783](https://github.com/CocoaPods/CocoaPods/issues/5783)
53
+
7
54
  ## 1.1.0.beta.1 (2016-07-11)
8
55
 
9
56
  ##### Enhancements
@@ -34,7 +81,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
34
81
 
35
82
  * [Installer] Set the SWIFT_VERSION for CocoaPods generated targets.
36
83
  [Danielle Tomlinson](https://github.com/DanToml)
37
- [#5540](https://github.com/CocoaPods/CocoaPods/pulls/5540)
84
+ [#5540](https://github.com/CocoaPods/CocoaPods/pull/5540)
38
85
 
39
86
  * Print message when skipping user project integration.
40
87
  [Danielle Tomlinson](https://github.com/dantoml)
@@ -115,7 +162,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
115
162
 
116
163
  ##### Enhancements
117
164
 
118
- * None.
165
+ * Improve host target detection for embedded targets
166
+ in sub-projects.
167
+ [Ben Asher](https://github.com/benasher44)
168
+ [#5622](https://github.com/CocoaPods/CocoaPods/issues/5622)
119
169
 
120
170
  ##### Bug Fixes
121
171
 
@@ -56,7 +56,7 @@ module Pod
56
56
  podfile = ''
57
57
  podfile << "project '#{@project_path}'\n\n" if @project_path
58
58
  podfile << <<-PLATFORM.strip_heredoc
59
- # Uncomment this line to define a global platform for your project
59
+ # Uncomment the next line to define a global platform for your project
60
60
  # platform :ios, '9.0'
61
61
  PLATFORM
62
62
 
@@ -76,7 +76,7 @@ module Pod
76
76
  end
77
77
 
78
78
  # @param [[Xcodeproj::PBXTarget]] targets
79
- # An array which always has a target as it's first item
79
+ # An array which always has a target as its first item
80
80
  # and may optionally contain related test targets
81
81
  #
82
82
  # @return [String] the text for the target module
@@ -86,13 +86,13 @@ module Pod
86
86
 
87
87
  target_module << if app.resolved_build_setting('SWIFT_OPTIMIZATION_LEVEL').values.any?
88
88
  <<-RUBY
89
- # Comment this line if you're not using Swift and don't want to use dynamic frameworks
89
+ # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
90
90
  use_frameworks!
91
91
 
92
92
  RUBY
93
93
  else
94
94
  <<-RUBY
95
- # Uncomment this line if you're using Swift or would like to use dynamic frameworks
95
+ # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
96
96
  # use_frameworks!
97
97
 
98
98
  RUBY
@@ -111,7 +111,7 @@ module Pod
111
111
  end
112
112
 
113
113
  # @param [[Xcodeproj::PBXTarget]] targets
114
- # An array which always has a target as it's first item
114
+ # An array which always has a target as its first item
115
115
  # and may optionally contain a second target as its test target
116
116
  #
117
117
  # @return [String] the text for the target module
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.1.0.beta.1'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.1.0.beta.2'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -70,6 +70,9 @@ module Pod
70
70
  # in embedded targets.
71
71
  if !target.requires_host_target? && pod_targets.any?(&:uses_swift?)
72
72
  config['EMBEDDED_CONTENT_CONTAINS_SWIFT'] = 'YES'
73
+ config['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'YES'
74
+ else
75
+ config['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO'
73
76
  end
74
77
  @xcconfig = Xcodeproj::Config.new(config)
75
78
 
@@ -34,7 +34,6 @@ module Pod
34
34
  autoload :PostInstallHooksContext, 'cocoapods/installer/post_install_hooks_context'
35
35
  autoload :PreInstallHooksContext, 'cocoapods/installer/pre_install_hooks_context'
36
36
  autoload :SourceProviderHooksContext, 'cocoapods/installer/source_provider_hooks_context'
37
- autoload :Migrator, 'cocoapods/installer/migrator'
38
37
  autoload :PodfileValidator, 'cocoapods/installer/podfile_validator'
39
38
  autoload :PodSourceInstaller, 'cocoapods/installer/pod_source_installer'
40
39
  autoload :PodSourcePreparer, 'cocoapods/installer/pod_source_preparer'
@@ -81,7 +80,7 @@ module Pod
81
80
  #
82
81
  attr_accessor :update
83
82
 
84
- # @return [Bool] Whether the spec repos should be updated.
83
+ # @return [Boolean] Whether the spec repos should be updated.
85
84
  #
86
85
  attr_accessor :repo_update
87
86
  alias_method :repo_update?, :repo_update
@@ -133,7 +132,6 @@ module Pod
133
132
  deintegrate_if_different_major_version
134
133
  sandbox.prepare
135
134
  ensure_plugins_are_installed!
136
- Migrator.migrate(sandbox)
137
135
  run_plugins_pre_install_hooks
138
136
  end
139
137
  end
@@ -634,7 +632,7 @@ module Pod
634
632
  #
635
633
  # @raise Raises an informative if the hooks raises.
636
634
  #
637
- # @return [Bool] Whether the hook was run.
635
+ # @return [Boolean] Whether the hook was run.
638
636
  #
639
637
  def run_podfile_pre_install_hook
640
638
  podfile.pre_install!(self)
@@ -662,7 +660,7 @@ module Pod
662
660
  #
663
661
  # @raise Raises an informative if the hooks raises.
664
662
  #
665
- # @return [Bool] Whether the hook was run.
663
+ # @return [Boolean] Whether the hook was run.
666
664
  #
667
665
  def run_podfile_post_install_hook
668
666
  podfile.post_install!(self)
@@ -247,7 +247,6 @@ module Pod
247
247
  next unless embedded_target.user_targets.map(&:uuid).any? do |embedded_uuid|
248
248
  embedded_uuids.include? embedded_uuid
249
249
  end
250
- raise Informative, "#{aggregate_target.name} must call use_frameworks! because it is hosting an embedded target that calls use_frameworks!." unless aggregate_target.requires_frameworks?
251
250
  pod_target_names = aggregate_target.pod_targets.map(&:name)
252
251
  # This embedded target is hosted by the aggregate target's user_target; copy over the non-duplicate pod_targets
253
252
  aggregate_target.pod_targets = aggregate_target.pod_targets + embedded_target.pod_targets.select do |pod_target|
@@ -257,7 +256,8 @@ module Pod
257
256
  end
258
257
 
259
258
  # Raises an error if there are embedded targets in the Podfile, but
260
- # their host targets have not been declared in the Podfile
259
+ # their host targets have not been declared in the Podfile. As it
260
+ # finds host targets, it collection information on host target types.
261
261
  #
262
262
  # @param [Array<AggregateTarget>] aggregate_targets the generated
263
263
  # aggregate targets
@@ -265,19 +265,85 @@ module Pod
265
265
  # @param [Array<AggregateTarget>] embedded_aggregate_targets the aggregate targets
266
266
  # representing the embedded targets to be integrated
267
267
  #
268
- def verify_host_targets_in_podfile(aggregate_targets, embedded_aggregate_targets)
269
- aggregate_target_uuids = Set.new aggregate_targets.map(&:user_targets).flatten.map(&:uuid)
268
+ def analyze_host_targets_in_podfile(aggregate_targets, embedded_aggregate_targets)
269
+ target_definitions_by_uuid = {}
270
+ # Collect aggregate target definitions by uuid to later lookup host target
271
+ # definitions and verify their compatiblity with their embedded targets
272
+ aggregate_targets.each do |target|
273
+ target.user_targets.map(&:uuid).each do |uuid|
274
+ target_definitions_by_uuid[uuid] = target.target_definition
275
+ end
276
+ end
277
+ aggregate_target_user_projects = aggregate_targets.map(&:user_project)
270
278
  embedded_targets_missing_hosts = []
279
+ host_uuid_to_embedded_target_definitions = {}
280
+ # Search all of the known user projects for each embedded target's hosts
271
281
  embedded_aggregate_targets.each do |target|
272
- host_uuids = target.user_targets.map do |user_target|
273
- target.user_project.host_targets_for_embedded_target(user_target).map(&:uuid)
274
- end.flatten
282
+ host_uuids = []
283
+ aggregate_target_user_projects.product(target.user_targets).each do |user_project, user_target|
284
+ host_targets = user_project.host_targets_for_embedded_target(user_target)
285
+ host_targets.map(&:symbol_type).each do |product_type|
286
+ target.add_host_target_product_type(product_type)
287
+ end
288
+ host_uuids += host_targets.map(&:uuid)
289
+ end
290
+ # For each host, keep track of its embedded target definitions
291
+ # to later verify each embedded target's compatiblity with its host,
292
+ # ignoring the hosts that aren't known to CocoaPods (no target
293
+ # definitions in the Podfile)
294
+ host_uuids.each do |uuid|
295
+ (host_uuid_to_embedded_target_definitions[uuid] ||= []) << target.target_definition if target_definitions_by_uuid.key? uuid
296
+ end
297
+ # If none of the hosts are known to CocoaPods (no target definitions
298
+ # in the Podfile), add it to the list of targets missing hosts
275
299
  embedded_targets_missing_hosts << target unless host_uuids.any? do |uuid|
276
- aggregate_target_uuids.include? uuid
300
+ target_definitions_by_uuid.key? uuid
277
301
  end
278
302
  end
303
+
279
304
  unless embedded_targets_missing_hosts.empty?
280
- raise Informative, "Unable to find host target for #{embedded_targets_missing_hosts.map(&:name).join(', ')}. Please add the host targets for the embedded targets to the Podfile."
305
+ embedded_targets_missing_hosts_product_types = embedded_targets_missing_hosts.map(&:user_targets).flatten.map(&:symbol_type).uniq
306
+ # If the targets missing hosts are only frameworks, then this is likely
307
+ # a project for doing framework development. In that case, just warn that
308
+ # the frameworks that these targets depend on won't be integrated anywhere
309
+ if embedded_targets_missing_hosts_product_types == [:framework]
310
+ UI.warn 'The Podfile contains framework targets, for which the Podfile does not contain host targets (targets which embed the framework).' \
311
+ "\n" \
312
+ 'If this project is for doing framework development, you can ignore this message. Otherwise, add a target to the Podfile that embeds these frameworks to make this message go away (e.g. a test target).'
313
+ else
314
+ target_names = embedded_targets_missing_hosts.map do |target|
315
+ target.name.sub('Pods-', '') # Make the target names more recognizable to the user
316
+ end.join ', '
317
+ raise Informative, "Unable to find host target(s) for #{target_names}. Please add the host targets for the embedded targets to the Podfile." \
318
+ "\n" \
319
+ 'Certain kinds of targets require a host target. A host target is a "parent" target which embeds a "child" target. These are example types of targets that need a host target:' \
320
+ "\n- Framework" \
321
+ "\n- App Extension" \
322
+ "\n- Watch OS 1 Extension" \
323
+ "\n- Messages Extension (except when used with a Messages Application)"
324
+ end
325
+ end
326
+
327
+ target_mismatches = []
328
+ check_prop = lambda do |target_definition1, target_definition2, attr, msg|
329
+ attr1 = target_definition1.send(attr)
330
+ attr2 = target_definition2.send(attr)
331
+ if attr1 != attr2
332
+ target_mismatches << "- #{target_definition1.name} (#{attr1}) and #{target_definition2.name} (#{attr2}) #{msg}."
333
+ end
334
+ end
335
+ host_uuid_to_embedded_target_definitions.each do |uuid, target_definitions|
336
+ host_target_definition = target_definitions_by_uuid[uuid]
337
+ target_definitions.each do |target_definition|
338
+ check_prop.call(host_target_definition, target_definition, :platform, 'do not use the same platform')
339
+ check_prop.call(host_target_definition, target_definition, :uses_frameworks?, 'do not both set use_frameworks!')
340
+ check_prop.call(host_target_definition, target_definition, :swift_version, 'do not use the same Swift version')
341
+ end
342
+ end
343
+
344
+ unless target_mismatches.empty?
345
+ heading = 'Unable to integrate the following embedded targets with their respective host targets (a host target is a "parent" target which embeds a "child" target like a framework or extension):'
346
+ raise Informative, heading + "\n\n" + target_mismatches.sort.uniq.join("\n")
281
347
  end
282
348
  end
283
349
 
@@ -294,7 +360,7 @@ module Pod
294
360
  if installation_options.integrate_targets?
295
361
  # Copy embedded target pods that cannot have their pods embedded as frameworks to their host targets
296
362
  embedded_targets = aggregate_targets.select(&:requires_host_target?).select(&:requires_frameworks?)
297
- verify_host_targets_in_podfile(aggregate_targets, embedded_targets)
363
+ analyze_host_targets_in_podfile(aggregate_targets, embedded_targets)
298
364
  aggregate_targets.each do |target|
299
365
  copy_embedded_target_pod_targets_to_host(target, embedded_targets)
300
366
  end
@@ -345,7 +411,7 @@ module Pod
345
411
  end
346
412
 
347
413
  # Setup the pod targets for an aggregate target. Deduplicates resulting
348
- # targets by grouping by grouping by platform and subspec by their root
414
+ # targets by grouping by platform and subspec by their root
349
415
  # to create a {PodTarget} for each spec.
350
416
  #
351
417
  # @param [Hash{Podfile::TargetDefinition => Array<Specification>}] specs_by_target
@@ -23,7 +23,11 @@ module Pod
23
23
  #
24
24
  def scope_suffixes
25
25
  return { variants.first => nil } if variants.count == 1
26
- scope_by_specs
26
+ Hash[scope_by_specs.map do |variant, scope|
27
+ require 'digest'
28
+ scope = Digest::MD5.hexdigest(scope)[0..7] if !scope.nil? && scope.length >= 50
29
+ [variant, scope]
30
+ end]
27
31
  end
28
32
 
29
33
  # Groups the collection by result of the block.
@@ -216,10 +216,9 @@ module Pod
216
216
  # @return [String] the targets Swift version or nil
217
217
  #
218
218
  def compute_swift_version_from_targets(targets)
219
- versions = targets.flat_map(&:build_configurations).
220
- flat_map { |config| config.build_settings['SWIFT_VERSION'] }.
221
- compact.
222
- uniq
219
+ versions = targets.flat_map do |target|
220
+ target.resolved_build_setting('SWIFT_VERSION').values
221
+ end.flatten.compact.uniq
223
222
  case versions.count
224
223
  when 0
225
224
  nil
@@ -21,9 +21,11 @@ module Pod
21
21
  # frameworks are embedded in the output directory / product bundle.
22
22
  #
23
23
  # @note This does not include :app_extension or :watch_extension because
24
- # these types must have their frameworks embedded in their host targets
24
+ # these types must have their frameworks embedded in their host targets.
25
+ # For messages extensions, this only applies if it's embedded in a messages
26
+ # application.
25
27
  #
26
- EMBED_FRAMEWORK_TARGET_TYPES = [:application, :unit_test_bundle, :ui_test_bundle, :watch2_extension].freeze
28
+ EMBED_FRAMEWORK_TARGET_TYPES = [:application, :unit_test_bundle, :ui_test_bundle, :watch2_extension, :messages_extension].freeze
27
29
 
28
30
  # @return [String] the name of the embed frameworks phase
29
31
  #
@@ -121,6 +123,7 @@ module Pod
121
123
  # will have their frameworks embedded in their host targets.
122
124
  #
123
125
  def remove_embed_frameworks_script_phase_from_embedded_targets
126
+ return unless target.requires_host_target?
124
127
  native_targets.each do |native_target|
125
128
  if AggregateTarget::EMBED_FRAMEWORKS_IN_HOST_TARGET_TYPES.include? native_target.symbol_type
126
129
  remove_embed_frameworks_script_phase(native_target)
@@ -201,6 +204,7 @@ module Pod
201
204
  # directory / product bundle.
202
205
  #
203
206
  def native_targets_to_embed_in
207
+ return [] if target.requires_host_target?
204
208
  native_targets.select do |target|
205
209
  EMBED_FRAMEWORK_TARGET_TYPES.include?(target.symbol_type)
206
210
  end
@@ -138,7 +138,7 @@ module Pod
138
138
  build_configuration.build_settings['STRIP_INSTALLED_PRODUCT'] = 'NO'
139
139
  build_configuration.build_settings['CLANG_ENABLE_OBJC_ARC'] = 'YES'
140
140
  build_configuration.build_settings['CODE_SIGNING_REQUIRED'] = 'NO'
141
- build_configuration.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = 'NO_SIGNING/'
141
+ build_configuration.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = 'NO_SIGNING/' # a bogus provisioning profile ID assumed to be invalid
142
142
  end
143
143
  end
144
144
  end
@@ -51,13 +51,15 @@ module Pod
51
51
  #
52
52
  def custom_build_settings
53
53
  settings = {
54
- 'CODE_SIGN_IDENTITY[sdk=iphoneos*]' => '',
55
- 'MACH_O_TYPE' => 'staticlib',
56
- 'OTHER_LDFLAGS' => '',
57
- 'OTHER_LIBTOOLFLAGS' => '',
58
- 'PODS_ROOT' => '$(SRCROOT)',
59
- 'PRODUCT_BUNDLE_IDENTIFIER' => 'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}',
60
- 'SKIP_INSTALL' => 'YES',
54
+ 'CODE_SIGN_IDENTITY[sdk=appletvos*]' => '',
55
+ 'CODE_SIGN_IDENTITY[sdk=iphoneos*]' => '',
56
+ 'CODE_SIGN_IDENTITY[sdk=watchos*]' => '',
57
+ 'MACH_O_TYPE' => 'staticlib',
58
+ 'OTHER_LDFLAGS' => '',
59
+ 'OTHER_LIBTOOLFLAGS' => '',
60
+ 'PODS_ROOT' => '$(SRCROOT)',
61
+ 'PRODUCT_BUNDLE_IDENTIFIER' => 'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}',
62
+ 'SKIP_INSTALL' => 'YES',
61
63
  }
62
64
  super.merge(settings)
63
65
  end
@@ -54,7 +54,11 @@ module Pod
54
54
  settings['PRIVATE_HEADERS_FOLDER_PATH'] = ''
55
55
  settings['PUBLIC_HEADERS_FOLDER_PATH'] = ''
56
56
  end
57
+
58
+ settings['CODE_SIGN_IDENTITY[sdk=appletvos*]'] = ''
57
59
  settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = ''
60
+ settings['CODE_SIGN_IDENTITY[sdk=watchos*]'] = ''
61
+
58
62
  if target.swift_version
59
63
  settings['SWIFT_VERSION'] = target.swift_version
60
64
  end
@@ -73,9 +73,10 @@ module Pod
73
73
  def specs_by_target
74
74
  @specs_by_target ||= {}.tap do |specs_by_target|
75
75
  podfile.target_definition_list.each do |target|
76
+ dependencies = {}
76
77
  specs = target.dependencies.map(&:name).flat_map do |name|
77
78
  node = @activated.vertex_named(name)
78
- valid_dependencies_for_target_from_node(target, node) << node
79
+ valid_dependencies_for_target_from_node(target, dependencies, node) << node
79
80
  end
80
81
 
81
82
  specs_by_target[target] = specs.
@@ -471,13 +472,19 @@ module Pod
471
472
  # An array of target-appropriate nodes whose `payload`s are
472
473
  # dependencies for `target`.
473
474
  #
474
- def valid_dependencies_for_target_from_node(target, node)
475
- validate_platform(node.payload, target)
476
- dependency_nodes = node.outgoing_edges.select do |edge|
477
- edge_is_valid_for_target?(edge, target)
478
- end.map(&:destination)
475
+ def valid_dependencies_for_target_from_node(target, dependencies, node)
476
+ dependencies[node.name] ||= begin
477
+ validate_platform(node.payload, target)
478
+ dependency_nodes = node.outgoing_edges.select do |edge|
479
+ edge_is_valid_for_target?(edge, target)
480
+ end.map(&:destination)
479
481
 
480
- dependency_nodes + dependency_nodes.flat_map { |n| valid_dependencies_for_target_from_node(target, n) }
482
+ dependency_nodes + dependency_nodes.flat_map do |item|
483
+ node_result = valid_dependencies_for_target_from_node(target, dependencies, item)
484
+
485
+ node_result
486
+ end
487
+ end
481
488
  end
482
489
 
483
490
  # Whether the given `edge` should be followed to find dependencies for the
@@ -8,6 +8,9 @@ module Pod
8
8
  attr_reader :target_definition
9
9
 
10
10
  # Product types where the product's frameworks must be embedded in a host target
11
+ #
12
+ # @note :messages_extension only applies when it is embedded in an app (as opposed to a messages app)
13
+ #
11
14
  EMBED_FRAMEWORKS_IN_HOST_TARGET_TYPES = [:app_extension, :framework, :messages_extension, :watch_extension].freeze
12
15
 
13
16
  # Initialize a new instance
@@ -24,6 +27,21 @@ module Pod
24
27
  @search_paths_aggregate_targets = []
25
28
  @file_accessors = []
26
29
  @xcconfigs = {}
30
+ @host_target_types = Set.new # Product types of the host target, if this target is embedded
31
+ end
32
+
33
+ # Adds product type to the list of product types for the host
34
+ # targets, in which this target will be embedded
35
+ #
36
+ # @param [Symbol] product_type Product type (symbol representation)
37
+ # of a host, in which this target will be embedded
38
+ #
39
+ # @note This is important for messages extensions, since a messages
40
+ # extension has its frameworks embedded in its host when
41
+ # its host is an app but not when it's a messages app
42
+ #
43
+ def add_host_target_product_type(product_type)
44
+ @host_target_types << product_type
27
45
  end
28
46
 
29
47
  # @return [Boolean] True if the user_target's pods are
@@ -39,7 +57,7 @@ module Pod
39
57
  return false if user_project.nil?
40
58
  symbol_types = user_targets.map(&:symbol_type).uniq
41
59
  raise ArgumentError, "Expected single kind of user_target for #{name}. Found #{symbol_types.join(', ')}." unless symbol_types.count == 1
42
- EMBED_FRAMEWORKS_IN_HOST_TARGET_TYPES.include? symbol_types[0]
60
+ EMBED_FRAMEWORKS_IN_HOST_TARGET_TYPES.include?(symbol_types[0]) && !@host_target_types.include?(:messages_application)
43
61
  end
44
62
 
45
63
  # @return [String] the label for the target.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.beta.1
4
+ version: 1.1.0.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-07-11 00:00:00.000000000 Z
14
+ date: 2016-09-03 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: cocoapods-core
@@ -19,338 +19,338 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 1.1.0.beta.1
22
+ version: 1.1.0.beta.2
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 1.1.0.beta.1
29
+ version: 1.1.0.beta.2
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - '>='
34
+ - - ">="
35
35
  - !ruby/object:Gem::Version
36
36
  version: 1.0.0
37
- - - <
37
+ - - "<"
38
38
  - !ruby/object:Gem::Version
39
39
  version: '2.0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - '>='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: 1.0.0
47
- - - <
47
+ - - "<"
48
48
  - !ruby/object:Gem::Version
49
49
  version: '2.0'
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: cocoapods-deintegrate
52
52
  requirement: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - '>='
54
+ - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: 1.0.0
57
- - - <
56
+ version: 1.0.1
57
+ - - "<"
58
58
  - !ruby/object:Gem::Version
59
59
  version: '2.0'
60
60
  type: :runtime
61
61
  prerelease: false
62
62
  version_requirements: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - '>='
64
+ - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: 1.0.0
67
- - - <
66
+ version: 1.0.1
67
+ - - "<"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '2.0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: cocoapods-downloader
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 1.1.0
77
- - - <
76
+ version: 1.1.1
77
+ - - "<"
78
78
  - !ruby/object:Gem::Version
79
79
  version: '2.0'
80
80
  type: :runtime
81
81
  prerelease: false
82
82
  version_requirements: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - '>='
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
- version: 1.1.0
87
- - - <
86
+ version: 1.1.1
87
+ - - "<"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '2.0'
90
90
  - !ruby/object:Gem::Dependency
91
91
  name: cocoapods-plugins
92
92
  requirement: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: 1.0.0
97
- - - <
97
+ - - "<"
98
98
  - !ruby/object:Gem::Version
99
99
  version: '2.0'
100
100
  type: :runtime
101
101
  prerelease: false
102
102
  version_requirements: !ruby/object:Gem::Requirement
103
103
  requirements:
104
- - - '>='
104
+ - - ">="
105
105
  - !ruby/object:Gem::Version
106
106
  version: 1.0.0
107
- - - <
107
+ - - "<"
108
108
  - !ruby/object:Gem::Version
109
109
  version: '2.0'
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: cocoapods-search
112
112
  requirement: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - '>='
114
+ - - ">="
115
115
  - !ruby/object:Gem::Version
116
116
  version: 1.0.0
117
- - - <
117
+ - - "<"
118
118
  - !ruby/object:Gem::Version
119
119
  version: '2.0'
120
120
  type: :runtime
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
- - - '>='
124
+ - - ">="
125
125
  - !ruby/object:Gem::Version
126
126
  version: 1.0.0
127
- - - <
127
+ - - "<"
128
128
  - !ruby/object:Gem::Version
129
129
  version: '2.0'
130
130
  - !ruby/object:Gem::Dependency
131
131
  name: cocoapods-stats
132
132
  requirement: !ruby/object:Gem::Requirement
133
133
  requirements:
134
- - - '>='
134
+ - - ">="
135
135
  - !ruby/object:Gem::Version
136
136
  version: 1.0.0
137
- - - <
137
+ - - "<"
138
138
  - !ruby/object:Gem::Version
139
139
  version: '2.0'
140
140
  type: :runtime
141
141
  prerelease: false
142
142
  version_requirements: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - '>='
144
+ - - ">="
145
145
  - !ruby/object:Gem::Version
146
146
  version: 1.0.0
147
- - - <
147
+ - - "<"
148
148
  - !ruby/object:Gem::Version
149
149
  version: '2.0'
150
150
  - !ruby/object:Gem::Dependency
151
151
  name: cocoapods-trunk
152
152
  requirement: !ruby/object:Gem::Requirement
153
153
  requirements:
154
- - - '>='
154
+ - - ">="
155
155
  - !ruby/object:Gem::Version
156
156
  version: 1.0.0
157
- - - <
157
+ - - "<"
158
158
  - !ruby/object:Gem::Version
159
159
  version: '2.0'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - '>='
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: 1.0.0
167
- - - <
167
+ - - "<"
168
168
  - !ruby/object:Gem::Version
169
169
  version: '2.0'
170
170
  - !ruby/object:Gem::Dependency
171
171
  name: cocoapods-try
172
172
  requirement: !ruby/object:Gem::Requirement
173
173
  requirements:
174
- - - '>='
174
+ - - ">="
175
175
  - !ruby/object:Gem::Version
176
176
  version: 1.1.0
177
- - - <
177
+ - - "<"
178
178
  - !ruby/object:Gem::Version
179
179
  version: '2.0'
180
180
  type: :runtime
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
- - - '>='
184
+ - - ">="
185
185
  - !ruby/object:Gem::Version
186
186
  version: 1.1.0
187
- - - <
187
+ - - "<"
188
188
  - !ruby/object:Gem::Version
189
189
  version: '2.0'
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: molinillo
192
192
  requirement: !ruby/object:Gem::Requirement
193
193
  requirements:
194
- - - ~>
194
+ - - "~>"
195
195
  - !ruby/object:Gem::Version
196
196
  version: 0.5.0
197
197
  type: :runtime
198
198
  prerelease: false
199
199
  version_requirements: !ruby/object:Gem::Requirement
200
200
  requirements:
201
- - - ~>
201
+ - - "~>"
202
202
  - !ruby/object:Gem::Version
203
203
  version: 0.5.0
204
204
  - !ruby/object:Gem::Dependency
205
205
  name: xcodeproj
206
206
  requirement: !ruby/object:Gem::Requirement
207
207
  requirements:
208
- - - '>='
208
+ - - ">="
209
209
  - !ruby/object:Gem::Version
210
- version: 1.2.0
211
- - - <
210
+ version: 1.3.0
211
+ - - "<"
212
212
  - !ruby/object:Gem::Version
213
213
  version: '2.0'
214
214
  type: :runtime
215
215
  prerelease: false
216
216
  version_requirements: !ruby/object:Gem::Requirement
217
217
  requirements:
218
- - - '>='
218
+ - - ">="
219
219
  - !ruby/object:Gem::Version
220
- version: 1.2.0
221
- - - <
220
+ version: 1.3.0
221
+ - - "<"
222
222
  - !ruby/object:Gem::Version
223
223
  version: '2.0'
224
224
  - !ruby/object:Gem::Dependency
225
225
  name: activesupport
226
226
  requirement: !ruby/object:Gem::Requirement
227
227
  requirements:
228
- - - '>='
228
+ - - ">="
229
229
  - !ruby/object:Gem::Version
230
230
  version: 4.0.2
231
- - - <
231
+ - - "<"
232
232
  - !ruby/object:Gem::Version
233
233
  version: '5'
234
234
  type: :runtime
235
235
  prerelease: false
236
236
  version_requirements: !ruby/object:Gem::Requirement
237
237
  requirements:
238
- - - '>='
238
+ - - ">="
239
239
  - !ruby/object:Gem::Version
240
240
  version: 4.0.2
241
- - - <
241
+ - - "<"
242
242
  - !ruby/object:Gem::Version
243
243
  version: '5'
244
244
  - !ruby/object:Gem::Dependency
245
245
  name: colored
246
246
  requirement: !ruby/object:Gem::Requirement
247
247
  requirements:
248
- - - ~>
248
+ - - "~>"
249
249
  - !ruby/object:Gem::Version
250
250
  version: '1.2'
251
251
  type: :runtime
252
252
  prerelease: false
253
253
  version_requirements: !ruby/object:Gem::Requirement
254
254
  requirements:
255
- - - ~>
255
+ - - "~>"
256
256
  - !ruby/object:Gem::Version
257
257
  version: '1.2'
258
258
  - !ruby/object:Gem::Dependency
259
259
  name: escape
260
260
  requirement: !ruby/object:Gem::Requirement
261
261
  requirements:
262
- - - ~>
262
+ - - "~>"
263
263
  - !ruby/object:Gem::Version
264
264
  version: 0.0.4
265
265
  type: :runtime
266
266
  prerelease: false
267
267
  version_requirements: !ruby/object:Gem::Requirement
268
268
  requirements:
269
- - - ~>
269
+ - - "~>"
270
270
  - !ruby/object:Gem::Version
271
271
  version: 0.0.4
272
272
  - !ruby/object:Gem::Dependency
273
273
  name: fourflusher
274
274
  requirement: !ruby/object:Gem::Requirement
275
275
  requirements:
276
- - - ~>
276
+ - - "~>"
277
277
  - !ruby/object:Gem::Version
278
278
  version: 1.0.1
279
279
  type: :runtime
280
280
  prerelease: false
281
281
  version_requirements: !ruby/object:Gem::Requirement
282
282
  requirements:
283
- - - ~>
283
+ - - "~>"
284
284
  - !ruby/object:Gem::Version
285
285
  version: 1.0.1
286
286
  - !ruby/object:Gem::Dependency
287
287
  name: gh_inspector
288
288
  requirement: !ruby/object:Gem::Requirement
289
289
  requirements:
290
- - - ~>
290
+ - - "~>"
291
291
  - !ruby/object:Gem::Version
292
292
  version: '1.0'
293
293
  type: :runtime
294
294
  prerelease: false
295
295
  version_requirements: !ruby/object:Gem::Requirement
296
296
  requirements:
297
- - - ~>
297
+ - - "~>"
298
298
  - !ruby/object:Gem::Version
299
299
  version: '1.0'
300
300
  - !ruby/object:Gem::Dependency
301
301
  name: nap
302
302
  requirement: !ruby/object:Gem::Requirement
303
303
  requirements:
304
- - - ~>
304
+ - - "~>"
305
305
  - !ruby/object:Gem::Version
306
306
  version: '1.0'
307
307
  type: :runtime
308
308
  prerelease: false
309
309
  version_requirements: !ruby/object:Gem::Requirement
310
310
  requirements:
311
- - - ~>
311
+ - - "~>"
312
312
  - !ruby/object:Gem::Version
313
313
  version: '1.0'
314
314
  - !ruby/object:Gem::Dependency
315
315
  name: bacon
316
316
  requirement: !ruby/object:Gem::Requirement
317
317
  requirements:
318
- - - ~>
318
+ - - "~>"
319
319
  - !ruby/object:Gem::Version
320
320
  version: '1.1'
321
321
  type: :development
322
322
  prerelease: false
323
323
  version_requirements: !ruby/object:Gem::Requirement
324
324
  requirements:
325
- - - ~>
325
+ - - "~>"
326
326
  - !ruby/object:Gem::Version
327
327
  version: '1.1'
328
328
  - !ruby/object:Gem::Dependency
329
329
  name: bundler
330
330
  requirement: !ruby/object:Gem::Requirement
331
331
  requirements:
332
- - - ~>
332
+ - - "~>"
333
333
  - !ruby/object:Gem::Version
334
334
  version: '1.3'
335
335
  type: :development
336
336
  prerelease: false
337
337
  version_requirements: !ruby/object:Gem::Requirement
338
338
  requirements:
339
- - - ~>
339
+ - - "~>"
340
340
  - !ruby/object:Gem::Version
341
341
  version: '1.3'
342
342
  - !ruby/object:Gem::Dependency
343
343
  name: rake
344
344
  requirement: !ruby/object:Gem::Requirement
345
345
  requirements:
346
- - - ~>
346
+ - - "~>"
347
347
  - !ruby/object:Gem::Version
348
348
  version: '10.0'
349
349
  type: :development
350
350
  prerelease: false
351
351
  version_requirements: !ruby/object:Gem::Requirement
352
352
  requirements:
353
- - - ~>
353
+ - - "~>"
354
354
  - !ruby/object:Gem::Version
355
355
  version: '10.0'
356
356
  description: |-
@@ -453,7 +453,6 @@ files:
453
453
  - lib/cocoapods/installer/analyzer/target_inspection_result.rb
454
454
  - lib/cocoapods/installer/analyzer/target_inspector.rb
455
455
  - lib/cocoapods/installer/installation_options.rb
456
- - lib/cocoapods/installer/migrator.rb
457
456
  - lib/cocoapods/installer/pod_source_installer.rb
458
457
  - lib/cocoapods/installer/pod_source_preparer.rb
459
458
  - lib/cocoapods/installer/podfile_validator.rb
@@ -497,17 +496,17 @@ require_paths:
497
496
  - lib
498
497
  required_ruby_version: !ruby/object:Gem::Requirement
499
498
  requirements:
500
- - - '>='
499
+ - - ">="
501
500
  - !ruby/object:Gem::Version
502
501
  version: 2.0.0
503
502
  required_rubygems_version: !ruby/object:Gem::Requirement
504
503
  requirements:
505
- - - '>='
504
+ - - ">="
506
505
  - !ruby/object:Gem::Version
507
506
  version: '0'
508
507
  requirements: []
509
508
  rubyforge_project:
510
- rubygems_version: 2.6.5
509
+ rubygems_version: 2.4.5.1
511
510
  signing_key:
512
511
  specification_version: 3
513
512
  summary: The Cocoa library package manager.
@@ -1,86 +0,0 @@
1
- require 'fileutils'
2
-
3
- module Pod
4
- class Installer
5
- # Migrates installations performed by previous versions of CocoaPods.
6
- #
7
- class Migrator
8
- class << self
9
- # Performs the migration.
10
- #
11
- # @param [Sandbox] sandbox
12
- # The sandbox which should be migrated.
13
- #
14
- def migrate(sandbox)
15
- return unless sandbox.manifest
16
- end
17
-
18
- # @!group Migration Steps
19
-
20
- # @!group Private helpers
21
-
22
- # Check whether a migration is required
23
- #
24
- # @param [#to_s] target_version
25
- # See Version#new.
26
- #
27
- # @param [Sandbox] sandbox
28
- # The sandbox
29
- #
30
- # @return [void]
31
- #
32
- def installation_minor?(target_version, sandbox)
33
- sandbox.manifest.cocoapods_version < Version.new(target_version)
34
- end
35
-
36
- # Makes a path creating any intermediate directory and printing an UI
37
- # message.
38
- #
39
- # @path [#to_s] path
40
- # The path.
41
- #
42
- # @return [void]
43
- #
44
- def make_path(path)
45
- return if path.exist?
46
- UI.message "- Making path #{UI.path(path)}" do
47
- path.mkpath
48
- end
49
- end
50
-
51
- # Moves a path to another one printing an UI message.
52
- #
53
- # @path [#to_s] source
54
- # The path to move.
55
- #
56
- # @path [#to_s] destination
57
- # The destination path.
58
- #
59
- # @return [void]
60
- #
61
- def move(source, destination)
62
- return unless source.exist?
63
- make_path(destination.dirname)
64
- UI.message "- Moving #{UI.path(source)} to #{UI.path(destination)}" do
65
- FileUtils.mv(source.to_s, destination.to_s)
66
- end
67
- end
68
-
69
- # Deletes a path, including non empty directories, printing an UI
70
- # message.
71
- #
72
- # @path [#to_s] path
73
- # The path.
74
- #
75
- # @return [void]
76
- #
77
- def delete(path)
78
- return unless path.exist?
79
- UI.message "- Deleting #{UI.path(path)}" do
80
- FileUtils.rm_rf(path)
81
- end
82
- end
83
- end
84
- end
85
- end
86
- end