cocoapods 1.9.1 → 1.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +292 -5
  3. data/README.md +2 -1
  4. data/lib/cocoapods/command/lib/lint.rb +12 -3
  5. data/lib/cocoapods/command/repo/push.rb +1 -1
  6. data/lib/cocoapods/command/repo/update.rb +11 -0
  7. data/lib/cocoapods/command/spec/lint.rb +12 -3
  8. data/lib/cocoapods/command.rb +12 -2
  9. data/lib/cocoapods/config.rb +17 -0
  10. data/lib/cocoapods/downloader/cache.rb +2 -2
  11. data/lib/cocoapods/gem_version.rb +1 -1
  12. data/lib/cocoapods/generator/app_target_helper.rb +10 -2
  13. data/lib/cocoapods/generator/copy_dsyms_script.rb +56 -0
  14. data/lib/cocoapods/generator/copy_resources_script.rb +2 -14
  15. data/lib/cocoapods/generator/copy_xcframework_script.rb +245 -0
  16. data/lib/cocoapods/generator/embed_frameworks_script.rb +125 -212
  17. data/lib/cocoapods/generator/script_phase_constants.rb +99 -0
  18. data/lib/cocoapods/installer/analyzer/target_inspection_result.rb +1 -1
  19. data/lib/cocoapods/installer/analyzer.rb +17 -8
  20. data/lib/cocoapods/installer/base_install_hooks_context.rb +135 -0
  21. data/lib/cocoapods/installer/installation_options.rb +5 -0
  22. data/lib/cocoapods/installer/pod_source_installer.rb +2 -1
  23. data/lib/cocoapods/installer/post_install_hooks_context.rb +1 -127
  24. data/lib/cocoapods/installer/post_integrate_hooks_context.rb +9 -0
  25. data/lib/cocoapods/installer/project_cache/project_metadata_cache.rb +4 -0
  26. data/lib/cocoapods/installer/sandbox_dir_cleaner.rb +2 -1
  27. data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +132 -111
  28. data/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb +13 -27
  29. data/lib/cocoapods/installer/xcode/pods_project_generator/app_host_installer.rb +5 -1
  30. data/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb +2 -1
  31. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb +8 -6
  32. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb +187 -61
  33. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb +61 -30
  34. data/lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb +3 -2
  35. data/lib/cocoapods/installer/xcode/pods_project_generator/target_installation_result.rb +5 -7
  36. data/lib/cocoapods/installer/xcode/pods_project_generator.rb +45 -6
  37. data/lib/cocoapods/installer/xcode/pods_project_generator_result.rb +19 -0
  38. data/lib/cocoapods/installer/xcode/target_validator.rb +1 -1
  39. data/lib/cocoapods/installer.rb +70 -3
  40. data/lib/cocoapods/sandbox/file_accessor.rb +10 -1
  41. data/lib/cocoapods/sources_manager.rb +2 -1
  42. data/lib/cocoapods/target/aggregate_target.rb +35 -0
  43. data/lib/cocoapods/target/build_settings.rb +94 -18
  44. data/lib/cocoapods/target/pod_target.rb +85 -11
  45. data/lib/cocoapods/target.rb +44 -2
  46. data/lib/cocoapods/user_interface/error_report.rb +1 -1
  47. data/lib/cocoapods/user_interface/inspector_reporter.rb +3 -10
  48. data/lib/cocoapods/validator.rb +38 -12
  49. data/lib/cocoapods/xcode/framework_paths.rb +1 -1
  50. data/lib/cocoapods/xcode/xcframework/xcframework_slice.rb +91 -4
  51. data/lib/cocoapods/xcode/xcframework.rb +17 -4
  52. data/lib/cocoapods.rb +3 -1
  53. metadata +31 -53
  54. data/lib/cocoapods/generator/prepare_artifacts_script.rb +0 -257
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d09ebc5f52b3cc99cbd28d1c02d4e91814d1da868f74e0471d24dc68af11418
4
- data.tar.gz: e32f37318381027f67961784e392e3b01535e46299a3ff33394bafcb86f376d3
3
+ metadata.gz: 9c9864dec487d5e04b5d9cf7f4bc36a25ba9793c629ae64bf71eabb30cc8b040
4
+ data.tar.gz: 70643343f2fc6e263c7fbcd41df19646b6c321d5c3b7d112b1a674bc72bdbdf1
5
5
  SHA512:
6
- metadata.gz: ac8f0545426c0f5bcbe9425a402a700a7b9e101036b7ca9762d627d5a081fd1aed30a1be33b10de4bad5488c43326c479cb63bbe0062e392623afc7d80e31460
7
- data.tar.gz: 4c939088685f310f79f110c38945d4551fdf009086e04677277b8d38523c5d3bb103526346708f4954a37bcfc72446366eb3b2a51088cb3b69c4a6e2942b1d78
6
+ metadata.gz: d1b48cdba64b6721446371c392d5fb1f93a28854addcc7dc4724e79484cbe995b75f46675ffd0a0ba3feafb60590e60baf22b725062119bf0e64246e68c5502c
7
+ data.tar.gz: de5fa055225078932fac6470a3fda8bb0deef31f6a9165a4b77c84efb778989e82edb9e54197a319b9704c1f0c415516fe703a6333f05f47401087d1e78efa18
data/CHANGELOG.md CHANGED
@@ -1,10 +1,289 @@
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.9.1 (2020-03-09)
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
+
92
+ ## 1.10.0.beta.2 (2020-08-12)
93
+
94
+ ##### Enhancements
95
+
96
+ * None.
97
+
98
+ ##### Bug Fixes
99
+
100
+ * Ensure that static frameworks are not embedded
101
+ [Bernard Gatt](https://github.com/BernardGatt)
102
+ [#9943](https://github.com/CocoaPods/CocoaPods/issues/9943)
103
+
104
+ * Ensure that the non-compilable resource skipping in static frameworks happens only for the pod itself
105
+ [Igor Makarov](https://github.com/igor-makarov)
106
+ [#9922](https://github.com/CocoaPods/CocoaPods/pull/9922)
107
+ [#9920](https://github.com/CocoaPods/CocoaPods/issues/9920)
108
+
109
+
110
+ ## 1.10.0.beta.1 (2020-07-17)
111
+
112
+ ##### Breaking
113
+
114
+ * Bump minimum Ruby version to 2.3.3 (included with macOS High Sierra)
115
+ [Eric Amorde](https://github.com/amorde)
116
+ [#9821](https://github.com/CocoaPods/CocoaPods/issues/9821)
117
+
118
+ ##### Enhancements
119
+
120
+ * Add the App Clip product symbol to the list of products that need embedding.
121
+ [Igor Makarov](https://github.com/igor-makarov)
122
+ [#9882](https://github.com/CocoaPods/CocoaPods/pull/9882)
123
+
124
+ * Allow gem to run as root when passing argument flag `--allow-root`
125
+ [Sean Reinhardt](https://github.com/seanreinhardtapps)
126
+ [#8929](https://github.com/CocoaPods/CocoaPods/issues/8929)
127
+
128
+ * Warn users to delete the master specs repo if its not explicitly used.
129
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
130
+ [#9871](https://github.com/CocoaPods/CocoaPods/pull/9871)
131
+
132
+ * Use User Project's compatibilityVersion instead of objectVersion when
133
+ deciding when to use xcfilelists.
134
+ [Sean Reinhardt](https://github.com/seanreinhardtapps)
135
+ [#9140](https://github.com/CocoaPods/CocoaPods/issues/9140)
136
+
137
+ * add a `--configuration` option to `pod lib lint` and `pod spec lint`.
138
+ [Gereon Steffens](https://github.com/gereons)
139
+ [#9686](https://github.com/CocoaPods/CocoaPods/issues/9686)
140
+
141
+ * Add a post_integrate_hook API
142
+ [lucasmpaim](https://github.com/lucasmpaim)
143
+ [#7432](https://github.com/CocoaPods/CocoaPods/issues/7432)
144
+
145
+ * Set the `BUILD_LIBRARY_FOR_DISTRIBUTION` build setting if integrating with
146
+ a target that has the setting set to `YES` (directly or in an .xcconfig).
147
+ [Juanjo López](https://github.com/juanjonol)
148
+ [#9232](https://github.com/CocoaPods/CocoaPods/issues/9232)
149
+
150
+ * Option to lint a specified set of test_specs
151
+ [Paul Beusterien](https://github.com/paulb777)
152
+ [#9392](https://github.com/CocoaPods/CocoaPods/pull/9392)
153
+
154
+ * Add --use-static-frameworks lint option
155
+ [Paul Beusterien](https://github.com/paulb777)
156
+ [#9632](https://github.com/CocoaPods/CocoaPods/pull/9632)
157
+
158
+ * Exclude the local spec-repos directory from Time Machine Backups.
159
+ [Jakob Krigovsky](https://github.com/sonicdoe)
160
+ [#8308](https://github.com/CocoaPods/CocoaPods/issues/8308)
161
+
162
+ ##### Bug Fixes
163
+
164
+ * Override Xcode 12 default for erroring on quoted imports in umbrellas.
165
+ [Paul Beusterien](https://github.com/paulb777)
166
+ [#9902](https://github.com/CocoaPods/CocoaPods/issues/9902)
167
+
168
+ * Remove bitcode symbol maps from embedded framework bundles
169
+ [Eric Amorde](https://github.com/amorde)
170
+ [#9681](https://github.com/CocoaPods/CocoaPods/issues/9681)
171
+
172
+ * Prevent "source changed" message for every version change when using trunk source
173
+ [cltnschlosser](https://github.com/cltnschlosser)
174
+ [#9865](https://github.com/CocoaPods/CocoaPods/issues/9865)
175
+
176
+ * When pod target is a static framework, save time by copying compiled resources
177
+ [Igor Makarov](https://github.com/igor-makarov)
178
+ [#9441](https://github.com/CocoaPods/CocoaPods/pull/9441)
179
+
180
+ * Re-implement `bcsymbolmap` copying to avoid duplicate outputs.
181
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
182
+ [mplorentz](https://github.com/mplorentz)
183
+ [#9734](https://github.com/CocoaPods/CocoaPods/pull/9734)
184
+
185
+ * Fix Xcode 11 warning when setting Bundle Identifier in `info_plist`
186
+ [Sean Reinhardt](https://github.com/seanreinhardtapps)
187
+ [#9536](https://github.com/CocoaPods/CocoaPods/issues/9536)
188
+
189
+ * Fix `incompatible encoding regexp match` for linting non-ascii pod name
190
+ [banjun](https://github.com/banjun)
191
+ [#9765](https://github.com/CocoaPods/CocoaPods/issues/9765)
192
+ [#9776](https://github.com/CocoaPods/CocoaPods/pull/9776)
193
+
194
+ * Fix crash when targets missing in Podfile
195
+ [Paul Beusterien](https://github.com/paulb777)
196
+ [#9745](https://github.com/CocoaPods/CocoaPods/pull/9745)
197
+
198
+ * Fix adding developer library search paths during pod validation.
199
+ [Nick Entin](https://github.com/NickEntin)
200
+ [#9736](https://github.com/CocoaPods/CocoaPods/pull/9736)
201
+
202
+ * Fix an issue that caused multiple xcframework scripts to produce the same output files
203
+ [Eric Amorde](https://github.com/amorde)
204
+ [#9670](https://github.com/CocoaPods/CocoaPods/issues/9670)
205
+ [#9720](https://github.com/CocoaPods/CocoaPods/pull/9720)
206
+
207
+ * Fix an issue preventing framework user targets with an xcframework dependency from building successfully
208
+ [Eric Amorde](https://github.com/amorde)
209
+ [#9525](https://github.com/CocoaPods/CocoaPods/issues/9525)
210
+ [#9720](https://github.com/CocoaPods/CocoaPods/pull/9720)
211
+
212
+ * Fix an issue preventing xcframeworks that wrapped static libraries from linking successfully
213
+ [Eric Amorde](https://github.com/amorde)
214
+ [#9528](https://github.com/CocoaPods/CocoaPods/issues/9528)
215
+ [#9720](https://github.com/CocoaPods/CocoaPods/pull/9720)
216
+
217
+ * Fix setting `swift_version` when deduplicate targets is turned off.
218
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
219
+ [#9689](https://github.com/CocoaPods/CocoaPods/pull/9689)
220
+
221
+ * Honor prefix_header_file=false for subspecs
222
+ [Paul Beusterien](https://github.com/paulb777)
223
+ [#9687](https://github.com/CocoaPods/CocoaPods/pull/9687)
224
+
225
+ * Do not clean user projects from sandbox.
226
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
227
+ [#9683](https://github.com/CocoaPods/CocoaPods/pull/9683)
228
+
229
+ * Fix mapping of resource paths for app specs.
230
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
231
+ [#9676](https://github.com/CocoaPods/CocoaPods/pull/9676)
232
+
233
+ * When preserving pod paths, preserve ALL the paths
234
+ [Igor Makarov](https://github.com/igor-makarov)
235
+ [#9483](https://github.com/CocoaPods/CocoaPods/pull/9483)
236
+
237
+ * Re-implement `dSYM` copying and stripping to avoid duplicate outputs.
238
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
239
+ [#9185](https://github.com/CocoaPods/CocoaPods/issues/9185)
240
+
241
+ * Add support for running tests through the scheme of the app spec host of a test spec
242
+ [Eric Amorde](https://github.com/amorde)
243
+ [#9332](https://github.com/CocoaPods/CocoaPods/issues/9332)
244
+
245
+ * Fix an issue that prevented variables in test bundle scheme settings from expanding
246
+ [Eric Amorde](https://github.com/amorde)
247
+ [#9539](https://github.com/CocoaPods/CocoaPods/pull/9539)
248
+
249
+ * Fix project path handling issue that caused cmake projects to be incorrect
250
+ [Paul Beusterien](https://github.com/paulb777)
251
+ [Andrew](https://github.com/mad-rain)
252
+ [#6268](https://github.com/CocoaPods/CocoaPods/pull/6268)
253
+
254
+ * Set `Missing Localizability` setting to `'YES'` to prevent warnings in Xcode 11
255
+ [Eric Amorde](https://github.com/amorde)
256
+ [#9612](https://github.com/CocoaPods/CocoaPods/pull/9612)
257
+
258
+ * Don't crash on non UTF-8 error message
259
+ [Kenji KATO](https://github.com/katoken-0215)
260
+ [#9706](https://github.com/CocoaPods/CocoaPods/pull/9706)
261
+
262
+ * Fix XCFramework slice selection when having more archs in slice than requested with $ARCHS
263
+ [jerbob92](https://github.com/jerbob92)
264
+ [#9790](https://github.com/CocoaPods/CocoaPods/pull/9790)
265
+
266
+ * Don't add app spec dependencies to the parent library's target in Xcode,
267
+ which was happening when the dependency's project was not being regenerated
268
+ due to incremental installation.
269
+ [segiddins][https://github.com/segiddins]
270
+
271
+ * Add the trunk repo to the default `sources` for the `repo push` command
272
+ [Elf Sundae](https://github.com/ElfSundae)
273
+ [#9840](https://github.com/CocoaPods/CocoaPods/pull/9840)
274
+
275
+ ## 1.9.3 (2020-05-29)
276
+
277
+ ##### Enhancements
278
+
279
+ * None.
280
+
281
+ ##### Bug Fixes
282
+
283
+ * None.
284
+
285
+
286
+ ## 1.9.2 (2020-05-22)
8
287
 
9
288
  ##### Enhancements
10
289
 
@@ -12,6 +291,15 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
12
291
 
13
292
  ##### Bug Fixes
14
293
 
294
+ * None.
295
+
296
+
297
+ ## 1.9.1 (2020-03-09)
298
+
299
+ ##### Enhancements
300
+
301
+ ##### Bug Fixes
302
+
15
303
  * Apply correct `SYSTEM_FRAMEWORK_SEARCH_PATHS` for `XCTUnwrap` fix.
16
304
  [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
17
305
  [#9579](https://github.com/CocoaPods/CocoaPods/pull/9579)
@@ -35,13 +323,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
35
323
 
36
324
  * Also apply Xcode 11 `XCTUnwrap` fix to library and framework targets that weakly link `XCTest`.
37
325
  [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
38
- [#9518](https://github.com/CocoaPods/CocoaPods/pull/9518)
39
-
326
+ [#9518](https://github.com/CocoaPods/CocoaPods/pull/9518)
327
+
40
328
  * Fix dSYM handling for XCFrameworks.
41
329
  [Eric Amorde](https://github.com/amorde)
42
330
  [#9530](https://github.com/CocoaPods/CocoaPods/issues/9530)
43
331
 
44
-
45
332
  ## 1.9.0.beta.3 (2020-02-04)
46
333
 
47
334
  ##### Enhancements
data/README.md CHANGED
@@ -4,7 +4,8 @@
4
4
 
5
5
  [![Build Status](http://img.shields.io/travis/CocoaPods/CocoaPods/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CocoaPods)
6
6
  [![Gem Version](http://img.shields.io/gem/v/cocoapods.svg?style=flat)](http://badge.fury.io/rb/cocoapods)
7
- [![Code Climate](http://img.shields.io/codeclimate/github/CocoaPods/CocoaPods.svg?style=flat)](https://codeclimate.com/github/CocoaPods/CocoaPods)
7
+ [![Maintainability](https://api.codeclimate.com/v1/badges/8f0fe544baf2ae1acc2b/maintainability)](https://codeclimate.com/github/CocoaPods/CocoaPods/maintainability)
8
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/8f0fe544baf2ae1acc2b/test_coverage)](https://codeclimate.com/github/CocoaPods/CocoaPods/test_coverage)
8
9
 
9
10
  CocoaPods manages dependencies for your Xcode projects.
10
11
 
@@ -22,6 +22,7 @@ module Pod
22
22
  ['--fail-fast', 'Lint stops on the first failing platform or subspec'],
23
23
  ['--use-libraries', 'Lint uses static libraries to install the spec'],
24
24
  ['--use-modular-headers', 'Lint uses modular headers during installation'],
25
+ ['--use-static-frameworks', 'Lint uses static frameworks during installation'],
25
26
  ["--sources=#{Pod::TrunkSource::TRUNK_REPO_URL}", 'The sources from which to pull dependent pods ' \
26
27
  "(defaults to #{Pod::TrunkSource::TRUNK_REPO_URL}). Multiple sources must be comma-delimited"],
27
28
  ['--platforms=ios,macos', 'Lint against specific platforms (defaults to all platforms supported by the ' \
@@ -34,7 +35,9 @@ module Pod
34
35
  'via :podspec. If there are --include-podspecs, then these are removed from them'],
35
36
  ['--skip-import-validation', 'Lint skips validating that the pod can be imported'],
36
37
  ['--skip-tests', 'Lint skips building and running tests during validation'],
38
+ ['--test-specs=test-spec1,test-spec2,etc', 'List of test specs to run'],
37
39
  ['--analyze', 'Validate with the Xcode Static Analysis tool'],
40
+ ['--configuration=CONFIGURATION', 'Build using the given configuration (defaults to Release)'],
38
41
  ].concat(super)
39
42
  end
40
43
 
@@ -47,6 +50,7 @@ module Pod
47
50
  @only_subspec = argv.option('subspec')
48
51
  @use_frameworks = !argv.flag?('use-libraries')
49
52
  @use_modular_headers = argv.flag?('use-modular-headers')
53
+ @use_static_frameworks = argv.flag?('use-static-frameworks')
50
54
  @source_urls = argv.option('sources', Pod::TrunkSource::TRUNK_REPO_URL).split(',')
51
55
  @platforms = argv.option('platforms', '').split(',')
52
56
  @private = argv.flag?('private', false)
@@ -54,9 +58,11 @@ module Pod
54
58
  @include_podspecs = argv.option('include-podspecs', nil)
55
59
  @external_podspecs = argv.option('external-podspecs', nil)
56
60
  @skip_import_validation = argv.flag?('skip-import-validation', false)
57
- @skip_tests = argv.flag?('skip-tests', false)
58
- @analyze = argv.flag?('analyze', false)
59
- @podspecs_paths = argv.arguments!
61
+ @skip_tests = argv.flag?('skip-tests', false)
62
+ @test_specs = argv.option('test-specs', nil)&.split(',')
63
+ @analyze = argv.flag?('analyze', false)
64
+ @podspecs_paths = argv.arguments!
65
+ @configuration = argv.option('configuration', nil)
60
66
  super
61
67
  end
62
68
 
@@ -77,13 +83,16 @@ module Pod
77
83
  validator.only_subspec = @only_subspec
78
84
  validator.use_frameworks = @use_frameworks
79
85
  validator.use_modular_headers = @use_modular_headers
86
+ validator.use_static_frameworks = @use_static_frameworks
80
87
  validator.ignore_public_only_results = @private
81
88
  validator.swift_version = @swift_version
82
89
  validator.skip_import_validation = @skip_import_validation
83
90
  validator.skip_tests = @skip_tests
91
+ validator.test_specs = @test_specs
84
92
  validator.analyze = @analyze
85
93
  validator.include_podspecs = @include_podspecs
86
94
  validator.external_podspecs = @external_podspecs
95
+ validator.configuration = @configuration
87
96
  validator.validate
88
97
 
89
98
  unless @clean
@@ -45,7 +45,7 @@ module Pod
45
45
  @local_only = argv.flag?('local-only')
46
46
  @repo = argv.shift_argument
47
47
  @source = source_for_repo
48
- @source_urls = argv.option('sources', config.sources_manager.all.map(&:url).join(',')).split(',')
48
+ @source_urls = argv.option('sources', config.sources_manager.all.map(&:url).append(Pod::TrunkSource::TRUNK_REPO_URL).uniq.join(',')).split(',')
49
49
  @podspec = argv.shift_argument
50
50
  @use_frameworks = !argv.flag?('use-libraries')
51
51
  @use_modular_headers = argv.flag?('use-modular-headers', false)
@@ -21,6 +21,17 @@ module Pod
21
21
  def run
22
22
  show_output = !config.silent?
23
23
  config.sources_manager.update(@name, show_output)
24
+ exclude_repos_dir_from_backup
25
+ end
26
+
27
+ private
28
+
29
+ # Excludes the repos directory from backups.
30
+ #
31
+ # @return [void]
32
+ #
33
+ def exclude_repos_dir_from_backup
34
+ config.exclude_from_backup(config.repos_dir)
24
35
  end
25
36
  end
26
37
  end
@@ -24,6 +24,7 @@ module Pod
24
24
  ['--fail-fast', 'Lint stops on the first failing platform or subspec'],
25
25
  ['--use-libraries', 'Lint uses static libraries to install the spec'],
26
26
  ['--use-modular-headers', 'Lint uses modular headers during installation'],
27
+ ['--use-static-frameworks', 'Lint uses static frameworks during installation'],
27
28
  ["--sources=#{Pod::TrunkSource::TRUNK_REPO_URL}", 'The sources from which to pull dependent pods ' \
28
29
  "(defaults to #{Pod::TrunkSource::TRUNK_REPO_URL}). Multiple sources must be comma-delimited"],
29
30
  ['--platforms=ios,macos', 'Lint against specific platforms (defaults to all platforms supported by the ' \
@@ -33,7 +34,9 @@ module Pod
33
34
  'This takes precedence over the Swift versions specified by the spec or a `.swift-version` file'],
34
35
  ['--skip-import-validation', 'Lint skips validating that the pod can be imported'],
35
36
  ['--skip-tests', 'Lint skips building and running tests during validation'],
37
+ ['--test-specs=test-spec1,test-spec2,etc', 'List of test specs to run'],
36
38
  ['--analyze', 'Validate with the Xcode Static Analysis tool'],
39
+ ['--configuration=CONFIGURATION', 'Build using the given configuration (defaults to Release)'],
37
40
  ].concat(super)
38
41
  end
39
42
 
@@ -46,14 +49,17 @@ module Pod
46
49
  @only_subspec = argv.option('subspec')
47
50
  @use_frameworks = !argv.flag?('use-libraries')
48
51
  @use_modular_headers = argv.flag?('use-modular-headers')
52
+ @use_static_frameworks = argv.flag?('use-static-frameworks')
49
53
  @source_urls = argv.option('sources', Pod::TrunkSource::TRUNK_REPO_URL).split(',')
50
54
  @platforms = argv.option('platforms', '').split(',')
51
55
  @private = argv.flag?('private', false)
52
56
  @swift_version = argv.option('swift-version', nil)
53
57
  @skip_import_validation = argv.flag?('skip-import-validation', false)
54
- @skip_tests = argv.flag?('skip-tests', false)
55
- @analyze = argv.flag?('analyze', false)
56
- @podspecs_paths = argv.arguments!
58
+ @skip_tests = argv.flag?('skip-tests', false)
59
+ @test_specs = argv.option('test-specs', nil)&.split(',')
60
+ @analyze = argv.flag?('analyze', false)
61
+ @podspecs_paths = argv.arguments!
62
+ @configuration = argv.option('configuration', nil)
57
63
  super
58
64
  end
59
65
 
@@ -70,11 +76,14 @@ module Pod
70
76
  validator.only_subspec = @only_subspec
71
77
  validator.use_frameworks = @use_frameworks
72
78
  validator.use_modular_headers = @use_modular_headers
79
+ validator.use_static_frameworks = @use_static_frameworks
73
80
  validator.ignore_public_only_results = @private
74
81
  validator.swift_version = @swift_version
75
82
  validator.skip_import_validation = @skip_import_validation
76
83
  validator.skip_tests = @skip_tests
84
+ validator.test_specs = @test_specs
77
85
  validator.analyze = @analyze
86
+ validator.configuration = @configuration
78
87
  validator.validate
79
88
  failure_reasons << validator.failure_reason
80
89
 
@@ -39,13 +39,13 @@ module Pod
39
39
 
40
40
  def self.options
41
41
  [
42
+ ['--allow-root', 'Allows CocoaPods to run as root'],
42
43
  ['--silent', 'Show nothing'],
43
44
  ].concat(super)
44
45
  end
45
46
 
46
47
  def self.run(argv)
47
- help! 'You cannot run CocoaPods as root.' if Process.uid == 0 && !Gem.win_platform?
48
-
48
+ ensure_not_root_or_allowed! argv
49
49
  verify_minimum_git_version!
50
50
  verify_xcode_license_approved!
51
51
 
@@ -85,6 +85,7 @@ module Pod
85
85
  def initialize(argv)
86
86
  super
87
87
  config.silent = argv.flag?('silent', config.silent)
88
+ config.allow_root = argv.flag?('allow-root', config.allow_root)
88
89
  config.verbose = self.verbose? unless verbose.nil?
89
90
  unless self.ansi_output?
90
91
  Colored2.disable!
@@ -92,6 +93,15 @@ module Pod
92
93
  end
93
94
  end
94
95
 
96
+ # Ensure root user
97
+ #
98
+ # @return [void]
99
+ #
100
+ def self.ensure_not_root_or_allowed!(argv, uid = Process.uid, is_windows = Gem.win_platform?)
101
+ root_allowed = argv.include?('--allow-root') || !ENV['COCOAPODS_ALLOW_ROOT'].nil?
102
+ help! 'You cannot run CocoaPods as root.' unless root_allowed || uid != 0 || is_windows
103
+ end
104
+
95
105
  # Ensure that the master spec repo exists
96
106
  #
97
107
  # @return [void]
@@ -60,6 +60,11 @@ module Pod
60
60
  attr_accessor :silent
61
61
  alias_method :silent?, :silent
62
62
 
63
+ # @return [Bool] Whether CocoaPods is allowed to run as root.
64
+ #
65
+ attr_accessor :allow_root
66
+ alias_method :allow_root?, :allow_root
67
+
63
68
  # @return [Bool] Whether a message should be printed when a new version of
64
69
  # CocoaPods is available.
65
70
  #
@@ -314,6 +319,18 @@ module Pod
314
319
  nil
315
320
  end
316
321
 
322
+ # Excludes the given dir from Time Machine backups.
323
+ #
324
+ # @param [Pathname] dir
325
+ # The directory to exclude from Time Machine backups.
326
+ #
327
+ # @return [void]
328
+ #
329
+ def exclude_from_backup(dir)
330
+ return if Gem.win_platform?
331
+ system('tmutil', 'addexclusion', dir.to_s, %i(out err) => File::NULL)
332
+ end
333
+
317
334
  public
318
335
 
319
336
  #-------------------------------------------------------------------------#
@@ -97,7 +97,7 @@ module Pod
97
97
  # `request`.
98
98
  #
99
99
  def path_for_pod(request, slug_opts = {})
100
- root + request.slug(slug_opts)
100
+ root + request.slug(**slug_opts)
101
101
  end
102
102
 
103
103
  # @param [Request] request
@@ -111,7 +111,7 @@ module Pod
111
111
  # `request`.
112
112
  #
113
113
  def path_for_spec(request, slug_opts = {})
114
- path = root + 'Specs' + request.slug(slug_opts)
114
+ path = root + 'Specs' + request.slug(**slug_opts)
115
115
  path.sub_ext('.podspec.json')
116
116
  end
117
117
 
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.9.1'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.10.2'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -127,9 +127,17 @@ module Pod
127
127
  # @return [void]
128
128
  #
129
129
  def self.add_xctest_search_paths(target)
130
+ requires_libs = target.platform_name == :ios &&
131
+ Version.new(target.deployment_target) < Version.new('12.2')
132
+
130
133
  target.build_configurations.each do |configuration|
131
- search_paths = configuration.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= '$(inherited)'
132
- search_paths << ' "$(PLATFORM_DIR)/Developer/Library/Frameworks"'
134
+ framework_search_paths = configuration.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= '$(inherited)'
135
+ framework_search_paths << ' "$(PLATFORM_DIR)/Developer/Library/Frameworks"'
136
+
137
+ if requires_libs
138
+ library_search_paths = configuration.build_settings['LIBRARY_SEARCH_PATHS'] ||= '$(inherited)'
139
+ library_search_paths << ' "$(PLATFORM_DIR)/Developer/usr/lib"'
140
+ end
133
141
  end
134
142
  end
135
143
 
@@ -0,0 +1,56 @@
1
+ module Pod
2
+ module Generator
3
+ class CopydSYMsScript
4
+ # @return [Array<Pathname>] dsym_paths the dSYM paths to include in the script contents.
5
+ #
6
+ attr_reader :dsym_paths
7
+
8
+ # @return [Array<Pathname>] bcsymbolmap_paths the bcsymbolmap paths to include in the script contents.
9
+ #
10
+ attr_reader :bcsymbolmap_paths
11
+
12
+ # Initialize a new instance
13
+ #
14
+ # @param [Array<Pathname>] dsym_paths @see dsym_paths
15
+ # @param [Array<Pathname>] bcsymbolmap_paths @see bcsymbolmap_paths
16
+ #
17
+ def initialize(dsym_paths, bcsymbolmap_paths)
18
+ @dsym_paths = Array(dsym_paths)
19
+ @bcsymbolmap_paths = Array(bcsymbolmap_paths)
20
+ end
21
+
22
+ # Saves the copy dSYMs script to the given pathname.
23
+ #
24
+ # @param [Pathname] pathname
25
+ # The path where the copy dSYMs script should be saved.
26
+ #
27
+ # @return [void]
28
+ #
29
+ def save_as(pathname)
30
+ pathname.open('w') do |file|
31
+ file.puts(generate)
32
+ end
33
+ File.chmod(0755, pathname.to_s)
34
+ end
35
+
36
+ # @return [String] The generated of the copy dSYMs script.
37
+ #
38
+ def generate
39
+ script = <<-SH.strip_heredoc
40
+ #{Pod::Generator::ScriptPhaseConstants::DEFAULT_SCRIPT_PHASE_HEADER}
41
+ #{Pod::Generator::ScriptPhaseConstants::STRIP_INVALID_ARCHITECTURES_METHOD}
42
+ #{Pod::Generator::ScriptPhaseConstants::RSYNC_PROTECT_TMP_FILES}
43
+ #{Pod::Generator::ScriptPhaseConstants::INSTALL_DSYM_METHOD}
44
+ #{Pod::Generator::ScriptPhaseConstants::INSTALL_BCSYMBOLMAP_METHOD}
45
+ SH
46
+ dsym_paths.each do |dsym_path|
47
+ script << %(install_dsym "#{dsym_path}"\n)
48
+ end
49
+ bcsymbolmap_paths.each do |bcsymbolmap_path|
50
+ script << %(install_bcsymbolmap "#{bcsymbolmap_path}"\n)
51
+ end
52
+ script
53
+ end
54
+ end
55
+ end
56
+ end