cocoapods 1.11.0 → 1.11.3

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: 4e617acf0486b439b72d009eb2905d7b78853b6ff52d8bd0c9e303534ad978e5
4
- data.tar.gz: ea674c9a2524f0ea96b413037afe634b72a53e8f5d8e0c44253e7ba559e5c19e
3
+ metadata.gz: aae7ed73ff99d6f5553364df8d34c4a26cc9825bd41ee3a59cb7b8d86f290197
4
+ data.tar.gz: a439077432771a732ad842f4d9c42c147eeebace664c6a4766bf922a91c8dd6b
5
5
  SHA512:
6
- metadata.gz: 4c2a0a0a9a3d92658aa77309c41f51f0385d0d0556ab649fdfeed07996c8e7310c6adb2c09fcb6b3490c0ffe2e004df0a4c7ca8d1d15fe40a4adec40be923c96
7
- data.tar.gz: d91ebdc6f396a6f04a13439362131247037e7c477ef207c37f3432b383a7552d8e21ab5ffd408c6c8307a77de61476dbd428ff8109bc2d0f3c0f28d1f9cd55c8
6
+ metadata.gz: 61a5beb8911ca4a8fe200421d757187f0c70f3b30ec3b00712dd32627a9749797a6e693c385163844b78f15bee2f7a686f9faac83a5a83713d69c9c1b61574fe
7
+ data.tar.gz: a55f30e798efa79abb3f0a7bf103d30cec767661f95b9fe8ef8ff72413bc191b2a5d558f2819ebe6ef7c9f85d029d57dd9bbf1274cfdf34d171399981311b140
data/CHANGELOG.md CHANGED
@@ -4,6 +4,73 @@ To install or update CocoaPods see this [guide](https://guides.cocoapods.org/usi
4
4
 
5
5
  To install release candidates run `[sudo] gem install cocoapods --pre`
6
6
 
7
+ ## 1.11.3 (2022-03-16)
8
+
9
+ ##### Enhancements
10
+
11
+ * None.
12
+
13
+ ##### Bug Fixes
14
+
15
+ * Fix script breaking when attempting to print a warning.
16
+ [Igor Makarov](https://github.com/igor-makarov)
17
+ [#11251](https://github.com/CocoaPods/CocoaPods/issues/11251)
18
+
19
+ * Do not consider podspec_repo when analying sandbox for changes.
20
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
21
+ [#10985](https://github.com/CocoaPods/CocoaPods/pull/10985)
22
+
23
+ * Rewrite XCFramework slice selection using plist metadata.
24
+ [Igor Makarov](https://github.com/igor-makarov)
25
+ [#11229](https://github.com/CocoaPods/CocoaPods/pull/11229)
26
+
27
+ * Fix setting `LD_RUNTIME_SEARCH_PATHS` for aggregate targets that include dynamic xcframeworks.
28
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
29
+ [#11158](https://github.com/CocoaPods/CocoaPods/pull/11158)
30
+
31
+ * Add catch for YAML syntax error to prevent crash in `cdn_url?` check.
32
+ [Kanstantsin Shautsou](https://github.com/KostyaSha)
33
+ [#11010](https://github.com/CocoaPods/CocoaPods/issues/11010)
34
+
35
+ * Fix static Swift XCFramework import paths.
36
+ [Igor Makarov](https://github.com/igor-makarov)
37
+ [#11058](https://github.com/CocoaPods/CocoaPods/issues/10058)
38
+ [#11093](https://github.com/CocoaPods/CocoaPods/pull/11093)
39
+
40
+ ## 1.11.2 (2021-09-13)
41
+
42
+ ##### Enhancements
43
+
44
+ * None.
45
+
46
+ ##### Bug Fixes
47
+
48
+ * Do not validate modular header dependencies for pre-built Swift pods.
49
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
50
+ [#10912](https://github.com/CocoaPods/CocoaPods/issues/10912)
51
+
52
+
53
+ ## 1.11.1 (2021-09-12)
54
+
55
+ ##### Enhancements
56
+
57
+ * None.
58
+
59
+ ##### Bug Fixes
60
+
61
+ * Handle spec repo urls with user info when determining if they are CDN.
62
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
63
+ [#10941](https://github.com/CocoaPods/CocoaPods/issues/10941)
64
+
65
+ * Set `INFOPLIST_FILE` build setting to `$(SRCROOT)/App/App-Info.plist` during lint.
66
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
67
+ [#10927](https://github.com/CocoaPods/CocoaPods/issues/10927)
68
+
69
+ * Set `PRODUCT_BUNDLE_IDENTIFIER` for generated app during lint.
70
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
71
+ [#10933](https://github.com/CocoaPods/CocoaPods/issues/10933)
72
+
73
+
7
74
  ## 1.11.0 (2021-09-01)
8
75
 
9
76
  ##### Enhancements
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.11.0'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.11.3'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -64,6 +64,10 @@ module Pod
64
64
 
65
65
  #{Pod::Generator::ScriptPhaseConstants::RSYNC_PROTECT_TMP_FILES}
66
66
 
67
+ #{variant_for_slice}
68
+
69
+ #{archs_for_slice}
70
+
67
71
  copy_dir()
68
72
  {
69
73
  local source="$1"
@@ -77,7 +81,9 @@ copy_dir()
77
81
  SELECT_SLICE_RETVAL=""
78
82
 
79
83
  select_slice() {
80
- local paths=("$@")
84
+ local xcframework_name="$1"
85
+ xcframework_name="${xcframework_name##*/}"
86
+ local paths=("${@:2}")
81
87
  # Locate the correct slice of the .xcframework for the current architectures
82
88
  local target_path=""
83
89
 
@@ -93,29 +99,15 @@ select_slice() {
93
99
  fi
94
100
  for i in ${!paths[@]}; do
95
101
  local matched_all_archs="1"
96
- for target_arch in $target_archs
97
- do
98
- if ! [[ "${paths[$i]}" == *"$target_variant"* ]]; then
102
+ local slice_archs="$(archs_for_slice "${xcframework_name}/${paths[$i]}")"
103
+ local slice_variant="$(variant_for_slice "${xcframework_name}/${paths[$i]}")"
104
+ for target_arch in $target_archs; do
105
+ if ! [[ "${slice_variant}" == "$target_variant" ]]; then
99
106
  matched_all_archs="0"
100
107
  break
101
108
  fi
102
109
 
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
-
109
- # This regex matches all possible variants of the arch in the folder name:
110
- # Let's say the folder name is: ios-armv7_armv7s_arm64_arm64e/CoconutLib.framework
111
- # We match the following: -armv7_, _armv7s_, _arm64_ and _arm64e/.
112
- # If we have a specific variant: ios-i386_x86_64-simulator/CoconutLib.framework
113
- # We match the following: -i386_ and _x86_64-
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}([\\/_\\-]|$)"
118
- if ! [[ "${paths[$i]}" =~ $target_arch_regex ]]; then
110
+ if ! echo "${slice_archs}" | tr " " "\\n" | grep -F -q -x "$target_arch"; then
119
111
  matched_all_archs="0"
120
112
  break
121
113
  fi
@@ -137,10 +129,10 @@ install_xcframework() {
137
129
  local paths=("${@:4}")
138
130
 
139
131
  # Locate the correct slice of the .xcframework for the current architectures
140
- select_slice "${paths[@]}"
132
+ select_slice "${basepath}" "${paths[@]}"
141
133
  local target_path="$SELECT_SLICE_RETVAL"
142
134
  if [[ -z "$target_path" ]]; then
143
- echo "warning: [CP] Unable to find matching .xcframework slice in '${paths[@]}' for the current build architectures ($ARCHS)."
135
+ echo "warning: [CP] $(basename ${basepath}): Unable to find matching slice in '${paths[@]}' for the current build architectures ($ARCHS) and platform (${EFFECTIVE_PLATFORM_NAME-${PLATFORM_NAME}})."
144
136
  return
145
137
  fi
146
138
  local source="$basepath/$target_path"
@@ -183,6 +175,40 @@ install_xcframework() {
183
175
  args.join(' ')
184
176
  end
185
177
 
178
+ def variant_for_slice
179
+ script = ''
180
+ script << "variant_for_slice()\n"
181
+ script << "{\n"
182
+ script << " case \"$1\" in\n"
183
+ xcframeworks.each do |xcframework|
184
+ root = xcframework.path
185
+ xcframework.slices.each do |slice|
186
+ script << " #{shell_escape(root.basename.join(slice.path.dirname.relative_path_from(root)))})\n"
187
+ script << " echo \"#{slice.platform_variant}\"\n"
188
+ script << " ;;\n"
189
+ end
190
+ end
191
+ script << " esac\n"
192
+ script << '}'
193
+ end
194
+
195
+ def archs_for_slice
196
+ script = ''
197
+ script << "archs_for_slice()\n"
198
+ script << "{\n"
199
+ script << " case \"$1\" in\n"
200
+ xcframeworks.each do |xcframework|
201
+ root = xcframework.path
202
+ xcframework.slices.each do |slice|
203
+ script << " #{shell_escape(root.basename.join(slice.path.dirname.relative_path_from(root)))})\n"
204
+ script << " echo \"#{slice.supported_archs.sort.join(' ')}\"\n"
205
+ script << " ;;\n"
206
+ end
207
+ end
208
+ script << " esac\n"
209
+ script << '}'
210
+ end
211
+
186
212
  class << self
187
213
  # @param [Pathname] xcframework_path
188
214
  # the base path of the .xcframework bundle
@@ -145,7 +145,8 @@ module Pod
145
145
  return true if spec.version != sandbox_version(pod)
146
146
  return true if spec.checksum != sandbox_checksum(pod)
147
147
  return true if resolved_spec_names(pod) != sandbox_spec_names(pod)
148
- return true if podfile_dependency(pod) != sandbox_dependency(pod)
148
+ podfile_dep = podfile_dependency(pod)&.tap { |dep| dep.podspec_repo = nil }
149
+ return true if podfile_dep != sandbox_dependency(pod)
149
150
  return true if sandbox.predownloaded?(pod)
150
151
  return true if folder_empty?(pod)
151
152
  false
@@ -125,7 +125,7 @@ module Pod
125
125
  validate_platforms(resolver_specs_by_target)
126
126
  specifications = generate_specifications(resolver_specs_by_target)
127
127
  aggregate_targets, pod_targets = generate_targets(resolver_specs_by_target, target_inspections)
128
- sandbox_state = generate_sandbox_state(specifications)
128
+ sandbox_state = generate_sandbox_state(specifications)
129
129
  specs_by_target = resolver_specs_by_target.each_with_object({}) do |rspecs_by_target, hash|
130
130
  hash[rspecs_by_target[0]] = rspecs_by_target[1].map(&:spec)
131
131
  end
@@ -62,7 +62,8 @@ module Pod
62
62
  # @param [Hash] info_plist_entries see #info_plist_entries
63
63
  # @param [String] product_basename see #product_basename
64
64
  #
65
- def initialize(sandbox, project, platform, subgroup_name, group_name, app_target_label, add_main: true, add_launchscreen_storyboard: platform == :ios, info_plist_entries: {}, product_basename: nil)
65
+ def initialize(sandbox, project, platform, subgroup_name, group_name, app_target_label, add_main: true,
66
+ add_launchscreen_storyboard: platform == :ios, info_plist_entries: {}, product_basename: nil)
66
67
  @sandbox = sandbox
67
68
  @project = project
68
69
  @platform = platform
@@ -48,17 +48,23 @@ module Pod
48
48
  # @param [Hash] additional_entries
49
49
  # any additional entries to include in this Info.plist file.
50
50
  #
51
+ # @param [String] build_setting_value
52
+ # an optional value to set for the `INFOPLIST_FILE` build setting on the
53
+ # native target. If none is specified then the value is calculated from the
54
+ # Info.plist path relative to the sandbox root.
55
+ #
51
56
  # @return [void]
52
57
  #
53
58
  def create_info_plist_file_with_sandbox(sandbox, path, native_target, version, platform,
54
- bundle_package_type = :fmwk, additional_entries: {})
59
+ bundle_package_type = :fmwk, additional_entries: {},
60
+ build_setting_value: nil)
55
61
  UI.message "- Generating Info.plist file at #{UI.path(path)}" do
56
62
  generator = Generator::InfoPlistFile.new(version, platform, bundle_package_type, additional_entries)
57
63
  update_changed_file(generator, path)
58
64
 
59
- relative_path_string = path.relative_path_from(sandbox.root).to_s
65
+ build_setting_value ||= path.relative_path_from(sandbox.root).to_s
60
66
  native_target.build_configurations.each do |c|
61
- c.build_settings['INFOPLIST_FILE'] = relative_path_string
67
+ c.build_settings['INFOPLIST_FILE'] = build_setting_value
62
68
  end
63
69
  end
64
70
  end
@@ -129,7 +129,7 @@ module Pod
129
129
  def verify_swift_pods_have_module_dependencies
130
130
  error_messages = []
131
131
  pod_targets.each do |pod_target|
132
- next unless pod_target.uses_swift?
132
+ next unless pod_target.uses_swift? && pod_target.should_build?
133
133
 
134
134
  non_module_dependencies = []
135
135
  pod_target.dependent_targets.each do |dependent_target|
@@ -179,7 +179,7 @@ module Pod
179
179
  end
180
180
  end
181
181
 
182
- # @return [Array<Pathname>] The paths of the dynamic xcframework bundles
182
+ # @return [Array<Pathname>] The paths of the static xcframework bundles
183
183
  # that come shipped with the Pod.
184
184
  #
185
185
  def vendored_static_xcframeworks
@@ -188,6 +188,15 @@ module Pod
188
188
  end
189
189
  end
190
190
 
191
+ # @return [Array<Pathname>] The paths of the dynamic xcframework bundles
192
+ # that come shipped with the Pod.
193
+ #
194
+ def vendored_dynamic_xcframeworks
195
+ vendored_xcframeworks.select do |path|
196
+ Xcode::XCFramework.new(spec.name, path).build_type == BuildType.dynamic_framework
197
+ end
198
+ end
199
+
191
200
  # @return [Array<Pathname>] The paths of the static (fake) framework
192
201
  # bundles that come shipped with the Pod.
193
202
  #
@@ -71,19 +71,22 @@ module Pod
71
71
  # The URL of the source.
72
72
  #
73
73
  def cdn_url?(url)
74
- return unless url =~ %r{^https?:\/\/}
74
+ return false unless url =~ %r{^https?:\/\/}
75
75
 
76
76
  uri_options = {}
77
77
 
78
78
  netrc_info = Netrc.read
79
- netrc_host = URI.parse(url).host
79
+ uri = URI.parse(url)
80
+ return false unless uri.userinfo.nil?
81
+
82
+ netrc_host = uri.host
80
83
  credentials = netrc_info[netrc_host]
81
84
  uri_options[:http_basic_authentication] = credentials if credentials
82
85
 
83
86
  response = OpenURI.open_uri(url.chomp('/') + '/CocoaPods-version.yml', uri_options)
84
87
  response_hash = YAML.load(response.read) # rubocop:disable Security/YAMLLoad
85
88
  response_hash.is_a?(Hash) && !Source::Metadata.new(response_hash).latest_cocoapods_version.nil?
86
- rescue ::OpenURI::HTTPError, SocketError
89
+ rescue Psych::SyntaxError, ::OpenURI::HTTPError, SocketError
87
90
  return false
88
91
  rescue => e
89
92
  raise Informative, "Couldn't determine repo type for URL: `#{url}`: #{e}"
@@ -938,6 +938,8 @@ module Pod
938
938
  define_build_settings_method :swift_include_paths, :build_setting => true, :memoized => true, :sorted => true, :uniqued => true do
939
939
  paths = dependent_targets.flat_map { |pt| pt.build_settings[@configuration].swift_include_paths_to_import }
940
940
  paths.concat swift_include_paths_to_import if non_library_xcconfig?
941
+ vendored_static_library_search_paths = dependent_targets.flat_map { |pt| pt.build_settings[@configuration].vendored_static_library_search_paths }
942
+ paths.concat vendored_static_library_search_paths
941
943
  paths.concat ['$(PLATFORM_DIR)/Developer/usr/lib'] if should_apply_xctunwrap_fix?
942
944
  paths
943
945
  end
@@ -1283,7 +1285,7 @@ module Pod
1283
1285
  define_build_settings_method :any_vendored_dynamic_artifacts?, :memoized => true do
1284
1286
  pod_targets.any? do |pt|
1285
1287
  pt.file_accessors.any? do |fa|
1286
- !fa.vendored_dynamic_artifacts.empty?
1288
+ !fa.vendored_dynamic_artifacts.empty? || !fa.vendored_dynamic_xcframeworks.empty?
1287
1289
  end
1288
1290
  end
1289
1291
  end
@@ -583,12 +583,21 @@ module Pod
583
583
  app_target = Pod::Generator::AppTargetHelper.add_app_target(app_project, consumer.platform_name, deployment_target)
584
584
  sandbox = Sandbox.new(config.sandbox_root)
585
585
  info_plist_path = app_project.path.dirname.+('App/App-Info.plist')
586
- Pod::Installer::Xcode::PodsProjectGenerator::TargetInstallerHelper.create_info_plist_file_with_sandbox(sandbox, info_plist_path, app_target, '1.0.0', Platform.new(consumer.platform_name), :appl)
586
+ Pod::Installer::Xcode::PodsProjectGenerator::TargetInstallerHelper.create_info_plist_file_with_sandbox(sandbox,
587
+ info_plist_path,
588
+ app_target,
589
+ '1.0.0',
590
+ Platform.new(consumer.platform_name),
591
+ :appl,
592
+ :build_setting_value => '$(SRCROOT)/App/App-Info.plist')
587
593
  Pod::Generator::AppTargetHelper.add_swift_version(app_target, derived_swift_version)
588
- # Lint will fail if a AppIcon is set but no image is found with such name
589
- # Happens only with Static Frameworks enabled but shouldn't be set anyway
590
594
  app_target.build_configurations.each do |config|
595
+ # Lint will fail if a AppIcon is set but no image is found with such name
596
+ # Happens only with Static Frameworks enabled but shouldn't be set anyway
591
597
  config.build_settings.delete('ASSETCATALOG_COMPILER_APPICON_NAME')
598
+ # Ensure this is set generally but we have seen an issue with ODRs:
599
+ # see: https://github.com/CocoaPods/CocoaPods/issues/10933
600
+ config.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = 'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}'
592
601
  end
593
602
  app_project.save
594
603
  app_project.recreate_user_schemes
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.11.0
4
+ version: 1.11.3
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: 2021-09-01 00:00:00.000000000 Z
14
+ date: 2022-03-15 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.11.0
22
+ version: 1.11.3
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.11.0
29
+ version: 1.11.3
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -545,7 +545,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
545
545
  - !ruby/object:Gem::Version
546
546
  version: '0'
547
547
  requirements: []
548
- rubygems_version: 3.0.9
548
+ rubygems_version: 3.1.6
549
549
  signing_key:
550
550
  specification_version: 4
551
551
  summary: The Cocoa library package manager.