cocoapods 1.10.0.beta.2 → 1.10.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
  SHA256:
3
- metadata.gz: cb6ea2032e8f048ddbdddbef9d383ddb952c1d7ebec5c2a4ae2fa458b6047af8
4
- data.tar.gz: 0cb3253433506bb0ffbdabc77ef3ca3e4dcd098deeed4bffb9e05c342399a056
3
+ metadata.gz: 9c9864dec487d5e04b5d9cf7f4bc36a25ba9793c629ae64bf71eabb30cc8b040
4
+ data.tar.gz: 70643343f2fc6e263c7fbcd41df19646b6c321d5c3b7d112b1a674bc72bdbdf1
5
5
  SHA512:
6
- metadata.gz: 8d40b3fb83faad9c20a172c4b980f3aa2412169c180463747883504cb6747fd6adf76013451055c3f3cc3816a555468b9d77436ec73947bd9727192fc4f4d2ae
7
- data.tar.gz: 0f424168358d4940f151f2b67639d4782cf59619b36b62420d880e37ab46d7831cb55abcb1f9b0105e0d8c7933de44009d47a0156633f645254bf58f1fa9f408
6
+ metadata.gz: d1b48cdba64b6721446371c392d5fb1f93a28854addcc7dc4724e79484cbe995b75f46675ffd0a0ba3feafb60590e60baf22b725062119bf0e64246e68c5502c
7
+ data.tar.gz: de5fa055225078932fac6470a3fda8bb0deef31f6a9165a4b77c84efb778989e82edb9e54197a319b9704c1f0c415516fe703a6333f05f47401087d1e78efa18
data/CHANGELOG.md CHANGED
@@ -1,9 +1,94 @@
1
1
  # Installation & Update
2
2
 
3
- To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
3
+ To install or update CocoaPods see this [guide](https://guides.cocoapods.org/using/index.html).
4
4
 
5
5
  To install release candidates run `[sudo] gem install cocoapods --pre`
6
6
 
7
+ ## 1.10.2 (2021-07-28)
8
+
9
+ ##### Enhancements
10
+
11
+ * None.
12
+
13
+ ##### Bug Fixes
14
+
15
+ * Fix errors when archiving a Catalyst app which depends on a pod which uses `header_mappings_dir`.
16
+ [Thomas Goyne](https://github.com/tgoyne)
17
+ [#10224](https://github.com/CocoaPods/CocoaPods/pull/10224)
18
+
19
+ * Fix missing `-ObjC` for static XCFrameworks - take 2
20
+ [Paul Beusterien](https://github.com/paulb777)
21
+ [#10459](https://github.com/CocoaPods/CocoaPods/issuess/10459)
22
+
23
+ * Change URL validation failure to a note
24
+ [Paul Beusterien](https://github.com/paulb777)
25
+ [#10291](https://github.com/CocoaPods/CocoaPods/issues/10291)
26
+
27
+
28
+ ## 1.10.1 (2021-01-07)
29
+
30
+ ##### Enhancements
31
+
32
+ * None.
33
+
34
+ ##### Bug Fixes
35
+
36
+ * Fix library name in LD `-l` flags for XCFrameworks containing libraries
37
+ [Wes Campaigne](https://github.com/Westacular)
38
+ [#10165](https://github.com/CocoaPods/CocoaPods/issues/10165)
39
+
40
+ * Fix file extension replacement for resource paths when using static frameworks.
41
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
42
+ [#10206](https://github.com/CocoaPods/CocoaPods/issues/10206)
43
+
44
+ * Fix processing of xcassets resources when pod target is static framework
45
+ [Federico Trimboli](https://github.com/fedetrim)
46
+ [#10175](https://github.com/CocoaPods/CocoaPods/pull/10175)
47
+ [#10170](https://github.com/CocoaPods/CocoaPods/issues/10170)
48
+
49
+ * Fix missing `-ObjC` for static XCFrameworks
50
+ [Paul Beusterien](https://github.com/paulb777)
51
+ [#10234](https://github.com/CocoaPods/CocoaPods/pull/10234)
52
+
53
+
54
+ ## 1.10.0 (2020-10-20)
55
+
56
+ ##### Enhancements
57
+
58
+ * None.
59
+
60
+ ##### Bug Fixes
61
+
62
+ * Generate the correct LD `-l` flags for XCFrameworks containing libraries
63
+ [Wes Campaigne](https://github.com/Westacular)
64
+ [#10071](https://github.com/CocoaPods/CocoaPods/issues/10071)
65
+
66
+ * Add support for automatically embedding XCFramework debug symbols for XCFrameworks generated with Xcode 12
67
+ [johntmcintosh](https://github.com/johntmcintosh)
68
+ [#10111](https://github.com/CocoaPods/CocoaPods/issues/10111)
69
+
70
+ ## 1.10.0.rc.1 (2020-09-15)
71
+
72
+ ##### Enhancements
73
+
74
+ * None.
75
+
76
+ ##### Bug Fixes
77
+
78
+ * Fix XCFramework slice selection
79
+ [lowip](https://github.com/lowip)
80
+ [#10026](https://github.com/CocoaPods/CocoaPods/issues/10026)
81
+
82
+ * Honor test spec deployment target during validation.
83
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
84
+ [#9999](https://github.com/CocoaPods/CocoaPods/pull/9999)
85
+
86
+ * Ensure that incremental installation is able to set target dependencies for a
87
+ test spec that uses a custom `app_host_name` that is in a project that is not
88
+ regenerated.
89
+ [Samuel Giddins](https://github.com/segiddins)
90
+
91
+
7
92
  ## 1.10.0.beta.2 (2020-08-12)
8
93
 
9
94
  ##### Enhancements
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.10.0.beta.2'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.10.2'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -100,12 +100,21 @@ select_slice() {
100
100
  break
101
101
  fi
102
102
 
103
+ # Verifies that the path contains the variant string (simulator or maccatalyst) if the variant is set.
104
+ if [[ -z "$target_variant" && ("${paths[$i]}" == *"simulator"* || "${paths[$i]}" == *"maccatalyst"*) ]]; then
105
+ matched_all_archs="0"
106
+ break
107
+ fi
108
+
103
109
  # This regex matches all possible variants of the arch in the folder name:
104
110
  # Let's say the folder name is: ios-armv7_armv7s_arm64_arm64e/CoconutLib.framework
105
111
  # We match the following: -armv7_, _armv7s_, _arm64_ and _arm64e/.
106
112
  # If we have a specific variant: ios-i386_x86_64-simulator/CoconutLib.framework
107
113
  # We match the following: -i386_ and _x86_64-
108
- local target_arch_regex="[_\\-]${target_arch}[\\/_\\-]"
114
+ # When the .xcframework wraps a static library, the folder name does not include
115
+ # any .framework. In that case, the folder name can be: ios-arm64_armv7
116
+ # We also match _armv7$ to handle that case.
117
+ local target_arch_regex="[_\\-]${target_arch}([\\/_\\-]|$)"
109
118
  if ! [[ "${paths[$i]}" =~ $target_arch_regex ]]; then
110
119
  matched_all_archs="0"
111
120
  break
@@ -185,12 +194,8 @@ install_xcframework() {
185
194
  mkdir -p "$destination"
186
195
  fi
187
196
 
188
- if [[ "$package_type" == "library" ]]; then
189
- # Libraries can contain headers, module maps, and a binary, so we'll copy everything in the folder over
190
- copy_dir "$source/" "$destination"
191
- elif [[ "$package_type" == "framework" ]]; then
192
- copy_dir "$source" "$destination"
193
- fi
197
+ copy_dir "$source/" "$destination"
198
+
194
199
  echo "Copied $source to $destination"
195
200
  }
196
201
 
@@ -217,12 +222,7 @@ install_xcframework() {
217
222
  is_framework = xcframework.build_type.framework?
218
223
  args << shell_escape(is_framework ? 'framework' : 'library')
219
224
  slices.each do |slice|
220
- args << if is_framework
221
- shell_escape(slice.path.relative_path_from(root))
222
- else
223
- # We don't want the path to the library binary, we want the dir that contains it
224
- shell_escape(slice.path.dirname.relative_path_from(root))
225
- end
225
+ args << shell_escape(slice.path.dirname.relative_path_from(root))
226
226
  end
227
227
  args.join(' ')
228
228
  end
@@ -54,6 +54,10 @@ module Pod
54
54
  installation_results.each do |installation_result|
55
55
  native_target = installation_result.native_target
56
56
  target_label_by_metadata[native_target.name] = TargetMetadata.from_native_target(sandbox, native_target)
57
+ # app targets need to be added to the cache because they can be used as app hosts for test targets, even if those test targets live inside a different pod (and thus project)
58
+ installation_result.app_native_targets.each_value do |app_target|
59
+ target_label_by_metadata[app_target.name] = TargetMetadata.from_native_target(sandbox, app_target)
60
+ end
57
61
  end
58
62
  end
59
63
 
@@ -79,7 +79,11 @@ module Pod
79
79
  app_host_target.build_configurations.each do |configuration|
80
80
  configuration.build_settings['PRODUCT_NAME'] = app_target_label
81
81
  configuration.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = 'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}'
82
- configuration.build_settings['CODE_SIGN_IDENTITY'] = '' if platform == :osx
82
+ if platform == :osx
83
+ configuration.build_settings['CODE_SIGN_IDENTITY'] = ''
84
+ elsif platform == :ios
85
+ configuration.build_settings['CODE_SIGN_IDENTITY'] = 'iPhone Developer'
86
+ end
83
87
  configuration.build_settings['CURRENT_PROJECT_VERSION'] = '1'
84
88
  end
85
89
 
@@ -152,11 +152,13 @@ module Pod
152
152
  target_attributes[test_native_target.uuid.to_s] = { 'TestTargetID' => app_native_target.uuid.to_s }
153
153
  project.root_object.attributes['TargetAttributes'] = target_attributes
154
154
  test_native_target.add_dependency(app_native_target)
155
- else
155
+ elsif cached_dependency = metadata_cache.target_label_by_metadata[app_host_target_label]
156
156
  # Hit the cache
157
- cached_dependency = metadata_cache.target_label_by_metadata[app_host_target_label]
158
157
  project.add_cached_subproject_reference(sandbox, cached_dependency, project.dependencies_group)
159
158
  Project.add_cached_dependency(sandbox, test_native_target, cached_dependency)
159
+ else
160
+ raise "Expected to either have an installation or cache result for #{app_host_target_label} (from pod #{app_host_pod_target_label}) " \
161
+ "for target #{test_native_target.name} in project #{project.project_name}"
160
162
  end
161
163
  end
162
164
 
@@ -408,7 +408,11 @@ module Pod
408
408
  configuration.build_settings['CODE_SIGNING_ALLOWED'] = 'YES'
409
409
  end
410
410
  # For macOS we do not code sign the XCTest bundle because we do not code sign the frameworks either.
411
- configuration.build_settings['CODE_SIGN_IDENTITY'] = '' if target.platform == :osx
411
+ if target.platform == :osx
412
+ configuration.build_settings['CODE_SIGN_IDENTITY'] = ''
413
+ elsif target.platform == :ios
414
+ configuration.build_settings['CODE_SIGN_IDENTITY'] = 'iPhone Developer'
415
+ end
412
416
  end
413
417
 
414
418
  remove_pod_target_xcconfig_overrides_from_target(target.test_spec_build_settings_by_config[test_spec.name], test_native_target)
@@ -846,7 +850,7 @@ module Pod
846
850
  end
847
851
 
848
852
  # Creates a build phase which links the versioned header folders
849
- # of the OS X into the framework bundle's root root directory.
853
+ # of the OS X framework into the framework bundle's root directory.
850
854
  # This is only necessary because the way how headers are copied
851
855
  # via custom copy file build phases in combination with
852
856
  # header_mappings_dir interferes with xcodebuild's expectations
@@ -858,11 +862,16 @@ module Pod
858
862
  # @return [void]
859
863
  #
860
864
  def create_build_phase_to_symlink_header_folders(native_target)
861
- return unless target.platform.name == :osx && any_header_mapping_dirs?
865
+ # This is required on iOS for Catalyst, which uses macOS framework layouts
866
+ return unless (target.platform.name == :osx || target.platform.name == :ios) && any_header_mapping_dirs?
862
867
 
863
868
  build_phase = native_target.new_shell_script_build_phase('Create Symlinks to Header Folders')
864
869
  build_phase.shell_script = <<-eos.strip_heredoc
865
870
  cd "$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME" || exit 1
871
+ if [ ! -d Versions ]; then
872
+ # Not a versioned framework, so no need to do anything
873
+ exit 0
874
+ fi
866
875
 
867
876
  public_path="${PUBLIC_HEADERS_FOLDER_PATH\#\$CONTENTS_FOLDER_PATH/}"
868
877
  if [ ! -f "$public_path" ]; then
@@ -172,6 +172,15 @@ module Pod
172
172
  end
173
173
  end
174
174
 
175
+ # @return [Array<Pathname>] The paths of the dynamic xcframework bundles
176
+ # that come shipped with the Pod.
177
+ #
178
+ def vendored_static_xcframeworks
179
+ vendored_xcframeworks.select do |path|
180
+ Xcode::XCFramework.new(path).build_type == BuildType.static_framework
181
+ end
182
+ end
183
+
175
184
  # @return [Array<Pathname>] The paths of the static (fake) framework
176
185
  # bundles that come shipped with the Pod.
177
186
  #
@@ -289,7 +298,7 @@ module Pod
289
298
  # that come shipped with the Pod.
290
299
  #
291
300
  def vendored_static_artifacts
292
- vendored_static_libraries + vendored_static_frameworks
301
+ vendored_static_libraries + vendored_static_frameworks + vendored_static_xcframeworks
293
302
  end
294
303
 
295
304
  # @return [Hash{String => Array<Pathname>}] A hash that describes the
@@ -350,7 +350,7 @@ module Pod
350
350
  end
351
351
 
352
352
  def self.resource_extension_compilable?(input_extension)
353
- output_extension_for_resource(input_extension) != input_extension
353
+ output_extension_for_resource(input_extension) != input_extension && input_extension != '.xcassets'
354
354
  end
355
355
 
356
356
  #-------------------------------------------------------------------------#
@@ -292,7 +292,7 @@ module Pod
292
292
  extname = File.extname(resource_path)
293
293
  if self.class.resource_extension_compilable?(extname)
294
294
  output_extname = self.class.output_extension_for_resource(extname)
295
- built_product_dir.join(File.basename(resource_path, extname)).sub_ext(output_extname).to_s
295
+ built_product_dir.join(File.basename(resource_path)).sub_ext(output_extname).to_s
296
296
  else
297
297
  resource_path
298
298
  end
@@ -755,7 +755,7 @@ module Pod
755
755
  libraries.concat libraries_to_import
756
756
  xcframework_libraries = vendored_xcframeworks.
757
757
  select { |xcf| xcf.build_type.static_library? }.
758
- map(&:name).
758
+ flat_map { |xcf| linker_names_from_libraries([xcf.slices.first.binary_path]) }.
759
759
  uniq
760
760
  libraries.concat xcframework_libraries
761
761
  end
@@ -871,7 +871,16 @@ module Pod
871
871
 
872
872
  # @return [Array<String>]
873
873
  define_build_settings_method :header_search_paths, :build_setting => true, :memoized => true, :sorted => true do
874
- target.header_search_paths(:include_dependent_targets_for_test_spec => test_xcconfig? && non_library_spec, :include_dependent_targets_for_app_spec => app_xcconfig? && non_library_spec, :configuration => @configuration)
874
+ paths = target.header_search_paths(:include_dependent_targets_for_test_spec => test_xcconfig? && non_library_spec, :include_dependent_targets_for_app_spec => app_xcconfig? && non_library_spec, :configuration => @configuration)
875
+
876
+ dependent_vendored_xcframeworks = []
877
+ dependent_vendored_xcframeworks.concat vendored_xcframeworks
878
+ dependent_vendored_xcframeworks.concat dependent_targets.flat_map { |pt| pt.build_settings[@configuration].vendored_xcframeworks }
879
+ paths.concat dependent_vendored_xcframeworks.
880
+ select { |xcf| xcf.build_type.static_library? }.
881
+ map { |xcf| "#{BuildSettings.xcframework_intermediate_dir(xcf)}/Headers" }.
882
+ compact
883
+ paths
875
884
  end
876
885
 
877
886
  # @return [Array<String>]
@@ -443,7 +443,7 @@ module Pod
443
443
  if !resp
444
444
  warning('url', "There was a problem validating the URL #{url}.", true)
445
445
  elsif !resp.success?
446
- warning('url', "The URL (#{url}) is not reachable.", true)
446
+ note('url', "The URL (#{url}) is not reachable.", true)
447
447
  end
448
448
 
449
449
  resp
@@ -556,6 +556,8 @@ module Pod
556
556
  validation_dir.rmtree
557
557
  end
558
558
 
559
+ # @return [String] The deployment targret of the library spec.
560
+ #
559
561
  def deployment_target
560
562
  deployment_target = spec.subspec_by_name(subspec_name).deployment_target(consumer.platform_name)
561
563
  if consumer.platform_name == :ios && use_frameworks
@@ -711,7 +713,7 @@ module Pod
711
713
  UI.warn "Skipping compilation with `xcodebuild` because target contains no sources.\n".yellow
712
714
  else
713
715
  if analyze
714
- output = xcodebuild('analyze', scheme, 'Release')
716
+ output = xcodebuild('analyze', scheme, 'Release', :deployment_target => deployment_target)
715
717
  find_output = Executable.execute_command('find', [validation_dir, '-name', '*.html'], false)
716
718
  if find_output != ''
717
719
  message = 'Static Analysis failed.'
@@ -720,7 +722,7 @@ module Pod
720
722
  error('build_pod', message)
721
723
  end
722
724
  else
723
- output = xcodebuild('build', scheme, configuration ? configuration : 'Release')
725
+ output = xcodebuild('build', scheme, configuration ? configuration : 'Release', :deployment_target => deployment_target)
724
726
  end
725
727
  parsed_output = parse_xcodebuild_output(output)
726
728
  translate_output_to_linter_messages(parsed_output)
@@ -757,7 +759,7 @@ module Pod
757
759
  UI.warn "Skipping test spec `#{test_spec.name}` on platform `#{consumer.platform_name}` since it is not supported.\n".yellow
758
760
  else
759
761
  scheme = @installer.target_installation_results.first[pod_target.name].native_target_for_spec(test_spec)
760
- output = xcodebuild('test', scheme, 'Debug')
762
+ output = xcodebuild('test', scheme, 'Debug', :deployment_target => test_spec.deployment_target(consumer.platform_name))
761
763
  parsed_output = parse_xcodebuild_output(output)
762
764
  translate_output_to_linter_messages(parsed_output)
763
765
  end
@@ -1048,7 +1050,7 @@ module Pod
1048
1050
  # @return [String] Executes xcodebuild in the current working directory and
1049
1051
  # returns its output (both STDOUT and STDERR).
1050
1052
  #
1051
- def xcodebuild(action, scheme, configuration)
1053
+ def xcodebuild(action, scheme, configuration, deployment_target:)
1052
1054
  require 'fourflusher'
1053
1055
  command = %W(clean #{action} -workspace #{File.join(validation_dir, 'App.xcworkspace')} -scheme #{scheme} -configuration #{configuration})
1054
1056
  case consumer.platform_name
@@ -121,7 +121,16 @@ module Pod
121
121
  # @return [Pathname] the path to the bundled binary
122
122
  #
123
123
  def binary_path
124
- path + name
124
+ @binary_path ||= begin
125
+ case package_type
126
+ when :framework
127
+ path + name
128
+ when :library
129
+ path
130
+ else
131
+ raise Informative, "Invalid package type `#{package_type}`"
132
+ end
133
+ end
125
134
  end
126
135
  end
127
136
  end
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.10.0.beta.2
4
+ version: 1.10.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: 2020-08-12 00:00:00.000000000 Z
14
+ date: 2021-07-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: cocoapods-core
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 1.10.0.beta.2
22
+ version: 1.10.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.10.0.beta.2
29
+ version: 1.10.2
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -187,7 +187,7 @@ dependencies:
187
187
  requirements:
188
188
  - - ">="
189
189
  - !ruby/object:Gem::Version
190
- version: 1.17.0
190
+ version: 1.19.0
191
191
  - - "<"
192
192
  - !ruby/object:Gem::Version
193
193
  version: '2.0'
@@ -197,7 +197,7 @@ dependencies:
197
197
  requirements:
198
198
  - - ">="
199
199
  - !ruby/object:Gem::Version
200
- version: 1.17.0
200
+ version: 1.19.0
201
201
  - - "<"
202
202
  - !ruby/object:Gem::Version
203
203
  version: '2.0'