cocoapods 1.11.0 → 1.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +162 -2
- data/README.md +7 -8
- data/lib/cocoapods/command/lib/lint.rb +3 -0
- data/lib/cocoapods/command/repo/push.rb +3 -0
- data/lib/cocoapods/command/setup.rb +2 -2
- data/lib/cocoapods/command/spec/lint.rb +3 -0
- data/lib/cocoapods/config.rb +5 -5
- data/lib/cocoapods/executable.rb +1 -1
- data/lib/cocoapods/external_sources/abstract_external_source.rb +1 -1
- data/lib/cocoapods/external_sources/path_source.rb +1 -1
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/acknowledgements.rb +12 -0
- data/lib/cocoapods/generator/app_target_helper.rb +1 -1
- data/lib/cocoapods/generator/copy_resources_script.rb +1 -1
- data/lib/cocoapods/generator/copy_xcframework_script.rb +48 -22
- data/lib/cocoapods/generator/embed_frameworks_script.rb +1 -1
- data/lib/cocoapods/generator/info_plist_file.rb +1 -1
- data/lib/cocoapods/installer/analyzer/analysis_result.rb +3 -3
- data/lib/cocoapods/installer/analyzer/pod_variant.rb +1 -1
- data/lib/cocoapods/installer/analyzer/sandbox_analyzer.rb +8 -7
- data/lib/cocoapods/installer/analyzer.rb +9 -5
- data/lib/cocoapods/installer/base_install_hooks_context.rb +18 -3
- data/lib/cocoapods/installer/installation_options.rb +11 -0
- data/lib/cocoapods/installer/pod_source_downloader.rb +159 -0
- data/lib/cocoapods/installer/pod_source_installer.rb +10 -36
- data/lib/cocoapods/installer/project_cache/project_cache_analyzer.rb +2 -2
- data/lib/cocoapods/installer/project_cache/target_cache_key.rb +1 -1
- data/lib/cocoapods/installer/xcode/pods_project_generator/app_host_installer.rb +2 -1
- data/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb +37 -3
- data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb +6 -0
- data/lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb +1 -1
- data/lib/cocoapods/installer/xcode/pods_project_generator/target_installer_helper.rb +9 -3
- data/lib/cocoapods/installer/xcode/pods_project_generator.rb +36 -1
- data/lib/cocoapods/installer/xcode/target_validator.rb +1 -1
- data/lib/cocoapods/installer.rb +102 -34
- data/lib/cocoapods/native_target_extension.rb +1 -1
- data/lib/cocoapods/open-uri.rb +1 -1
- data/lib/cocoapods/project.rb +8 -8
- data/lib/cocoapods/resolver/resolver_specification.rb +1 -1
- data/lib/cocoapods/resolver.rb +3 -3
- data/lib/cocoapods/sandbox/file_accessor.rb +11 -2
- data/lib/cocoapods/sandbox/path_list.rb +1 -1
- data/lib/cocoapods/sandbox.rb +48 -12
- data/lib/cocoapods/sources_manager.rb +7 -4
- data/lib/cocoapods/target/build_settings.rb +9 -2
- data/lib/cocoapods/target/pod_target.rb +2 -2
- data/lib/cocoapods/user_interface.rb +2 -2
- data/lib/cocoapods/validator.rb +31 -20
- data/lib/cocoapods/xcode/xcframework/xcframework_slice.rb +12 -6
- data/lib/cocoapods/xcode/xcframework.rb +1 -1
- metadata +14 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7eb2a7cb51265484772462e33da3c268da859b1f18adffdb57d6e6f4c2d378a2
|
4
|
+
data.tar.gz: 4d47bdd4efa9026b670884c3b230adc94ffb69e66953945349e0d4a17f9d6018
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16cd5d292991ab0067b0611eb82e8fe6fa8d50bfe6ee36779bb45d5f14101e1b359d8cf6b8ae15aa74f54f6cb36d441429500ec1f8f7909928a15208b568e67a
|
7
|
+
data.tar.gz: 22d3de57cb0446e321e740591b5bd9378d3fc0ed4ee1b521b8ec8d33d18608f5a53b75e7086b4e5244221660c6f6f6b4328180d3c7b07a7fbbf562b9b108d58f
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,166 @@ 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.12.1 (2023-04-18)
|
8
|
+
|
9
|
+
##### Enhancements
|
10
|
+
|
11
|
+
* None.
|
12
|
+
|
13
|
+
##### Bug Fixes
|
14
|
+
|
15
|
+
* Xcode 14.3 fix: Pass the -f option when resolving the path to the symlinked source.
|
16
|
+
[Chris Vasselli](https://github.com/chrisvasselli)
|
17
|
+
[#11828](https://github.com/CocoaPods/CocoaPods/pull/11828)
|
18
|
+
[#11808](https://github.com/CocoaPods/CocoaPods/issues/11808)
|
19
|
+
|
20
|
+
* Fix typo in validation for `--validation-dir` help message
|
21
|
+
[Austin Evans](https://github.com/ajevans99)
|
22
|
+
[#11857](https://github.com/CocoaPods/CocoaPods/issues/11857)
|
23
|
+
|
24
|
+
# Xcode 14.3 fix: `pod lib lint` warning generation from main.m.
|
25
|
+
[Paul Beusterien](https://github.com/paulb777)
|
26
|
+
[#11846](https://github.com/CocoaPods/CocoaPods/issuess/11846)
|
27
|
+
|
28
|
+
## 1.12.0 (2023-02-27)
|
29
|
+
|
30
|
+
##### Enhancements
|
31
|
+
|
32
|
+
* Add ability to specify the `validation-dir` during `lint`.
|
33
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
34
|
+
[#11773](https://github.com/CocoaPods/CocoaPods/pull/11773)
|
35
|
+
|
36
|
+
* Correctly handle `.docc` documentation in source_files.
|
37
|
+
[haifengkao](https://github.com/haifengkao)
|
38
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
39
|
+
[#11438](https://github.com/CocoaPods/CocoaPods/pull/11438)
|
40
|
+
[#10885](https://github.com/CocoaPods/CocoaPods/issues/10885)
|
41
|
+
|
42
|
+
* Re-use the same path lists for pods that share the same root.
|
43
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
44
|
+
[#11417](https://github.com/CocoaPods/CocoaPods/pull/11417)
|
45
|
+
|
46
|
+
* Integrate `parallelizable` scheme DSL option.
|
47
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
48
|
+
[#11399](https://github.com/CocoaPods/CocoaPods/pull/11399)
|
49
|
+
|
50
|
+
* Use `${DEVELOPMENT_LANGUAGE}` as the default `CFBundleDevelopmentRegion` value in any generated `Info.plist`.
|
51
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
52
|
+
[#10950](https://github.com/CocoaPods/CocoaPods/pull/10950)
|
53
|
+
|
54
|
+
* Fix setting `LD_RUNTIME_SEARCH_PATHS` for aggregate targets that include dynamic xcframeworks.
|
55
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
56
|
+
[#11158](https://github.com/CocoaPods/CocoaPods/pull/11158)
|
57
|
+
|
58
|
+
* Add method for formatting licenses for acknowledgements generation.
|
59
|
+
[Raihaan Shouhell](https://github.com/res0nance)
|
60
|
+
[#10940](https://github.com/CocoaPods/CocoaPods/pull/10940)
|
61
|
+
|
62
|
+
* Add the ability to download pods in parallel
|
63
|
+
[Seth Friedman](https://github.com/sethfri)
|
64
|
+
[#11232](https://github.com/CocoaPods/CocoaPods/pull/11232)
|
65
|
+
|
66
|
+
* Include subprojects in the plugin post-install hook context
|
67
|
+
[Eric Amorde](https://github.com/amorde)
|
68
|
+
[#11224](https://github.com/CocoaPods/CocoaPods/pull/11224)
|
69
|
+
|
70
|
+
* Ensure the order of slices passed to the `install_xcframework` script (in the "Copy XCFrameworks" script build phase) is stable.
|
71
|
+
[Olivier Halligon](https://github.com/AliSoftware)
|
72
|
+
[#11707](https://github.com/CocoaPods/CocoaPods/pull/11707)
|
73
|
+
|
74
|
+
##### Bug Fixes
|
75
|
+
|
76
|
+
* Fix incremental installation when a development pod is deleted.
|
77
|
+
[John Szumski](https://github.com/jszumski)
|
78
|
+
[#11438](https://github.com/CocoaPods/CocoaPods/pull/11681)
|
79
|
+
|
80
|
+
* Clean sandbox when a pod switches from remote to local.
|
81
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
82
|
+
[#11213](https://github.com/CocoaPods/CocoaPods/pull/11213)
|
83
|
+
|
84
|
+
* Run post install hooks when "skip Pods.xcodeproj generation" option is set
|
85
|
+
[Elton Gao](https://github.com/gyfelton)
|
86
|
+
[#11073](https://github.com/CocoaPods/CocoaPods/pull/11073)
|
87
|
+
|
88
|
+
* Change minimal required version of ruby-macho to 2.3.0.
|
89
|
+
[xuzhongping](https://github.com/xuzhongping)
|
90
|
+
[#10390](https://github.com/CocoaPods/CocoaPods/issues/10390)
|
91
|
+
|
92
|
+
* Add .gitignores to the banana and snake fixtures
|
93
|
+
[Seth Friedman](https://github.com/sethfri)
|
94
|
+
[#11235](https://github.com/CocoaPods/CocoaPods/pull/11235)
|
95
|
+
|
96
|
+
* Fix publishing podspecs with watchOS support on Xcode 14
|
97
|
+
[Justin Martin](https://github.com/justinseanmartin)
|
98
|
+
[#11660](https://github.com/CocoaPods/CocoaPods/pull/11660)
|
99
|
+
|
100
|
+
## 1.11.3 (2022-03-16)
|
101
|
+
|
102
|
+
##### Enhancements
|
103
|
+
|
104
|
+
* None.
|
105
|
+
|
106
|
+
##### Bug Fixes
|
107
|
+
|
108
|
+
* Fix script breaking when attempting to print a warning.
|
109
|
+
[Igor Makarov](https://github.com/igor-makarov)
|
110
|
+
[#11251](https://github.com/CocoaPods/CocoaPods/issues/11251)
|
111
|
+
|
112
|
+
* Do not consider podspec_repo when analying sandbox for changes.
|
113
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
114
|
+
[#10985](https://github.com/CocoaPods/CocoaPods/pull/10985)
|
115
|
+
|
116
|
+
* Rewrite XCFramework slice selection using plist metadata.
|
117
|
+
[Igor Makarov](https://github.com/igor-makarov)
|
118
|
+
[#11229](https://github.com/CocoaPods/CocoaPods/pull/11229)
|
119
|
+
|
120
|
+
* Fix setting `LD_RUNTIME_SEARCH_PATHS` for aggregate targets that include dynamic xcframeworks.
|
121
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
122
|
+
[#11158](https://github.com/CocoaPods/CocoaPods/pull/11158)
|
123
|
+
|
124
|
+
* Add catch for YAML syntax error to prevent crash in `cdn_url?` check.
|
125
|
+
[Kanstantsin Shautsou](https://github.com/KostyaSha)
|
126
|
+
[#11010](https://github.com/CocoaPods/CocoaPods/issues/11010)
|
127
|
+
|
128
|
+
* Fix static Swift XCFramework import paths.
|
129
|
+
[Igor Makarov](https://github.com/igor-makarov)
|
130
|
+
[#11058](https://github.com/CocoaPods/CocoaPods/issues/10058)
|
131
|
+
[#11093](https://github.com/CocoaPods/CocoaPods/pull/11093)
|
132
|
+
|
133
|
+
## 1.11.2 (2021-09-13)
|
134
|
+
|
135
|
+
##### Enhancements
|
136
|
+
|
137
|
+
* None.
|
138
|
+
|
139
|
+
##### Bug Fixes
|
140
|
+
|
141
|
+
* Do not validate modular header dependencies for pre-built Swift pods.
|
142
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
143
|
+
[#10912](https://github.com/CocoaPods/CocoaPods/issues/10912)
|
144
|
+
|
145
|
+
|
146
|
+
## 1.11.1 (2021-09-12)
|
147
|
+
|
148
|
+
##### Enhancements
|
149
|
+
|
150
|
+
* None.
|
151
|
+
|
152
|
+
##### Bug Fixes
|
153
|
+
|
154
|
+
* Handle spec repo urls with user info when determining if they are CDN.
|
155
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
156
|
+
[#10941](https://github.com/CocoaPods/CocoaPods/issues/10941)
|
157
|
+
|
158
|
+
* Set `INFOPLIST_FILE` build setting to `$(SRCROOT)/App/App-Info.plist` during lint.
|
159
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
160
|
+
[#10927](https://github.com/CocoaPods/CocoaPods/issues/10927)
|
161
|
+
|
162
|
+
* Set `PRODUCT_BUNDLE_IDENTIFIER` for generated app during lint.
|
163
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
164
|
+
[#10933](https://github.com/CocoaPods/CocoaPods/issues/10933)
|
165
|
+
|
166
|
+
|
7
167
|
## 1.11.0 (2021-09-01)
|
8
168
|
|
9
169
|
##### Enhancements
|
@@ -7497,7 +7657,7 @@ that can be added to a settings bundle for an iOS application.
|
|
7497
7657
|
You don't need to do anything for this to happen, it should just work.
|
7498
7658
|
|
7499
7659
|
If you're not happy with the default boilerplate text generated for the title, header
|
7500
|
-
and footnotes in the files, it's possible to
|
7660
|
+
and footnotes in the files, it's possible to customize these by overriding the methods
|
7501
7661
|
that generate the text in your `Podfile` like this:
|
7502
7662
|
|
7503
7663
|
```ruby
|
@@ -7508,7 +7668,7 @@ class ::Pod::Generator::Acknowledgements
|
|
7508
7668
|
end
|
7509
7669
|
```
|
7510
7670
|
|
7511
|
-
You can even go one step further and
|
7671
|
+
You can even go one step further and customize the text on a per target basis by
|
7512
7672
|
checking against the target name, like this:
|
7513
7673
|
|
7514
7674
|
```ruby
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
### CocoaPods: The Cocoa dependency manager
|
4
4
|
|
5
|
-
[![Build Status](https://
|
5
|
+
[![Build Status](https://github.com/CocoaPods/CocoaPods/workflows/Specs/badge.svg)](https://github.com/CocoaPods/CocoaPods/actions/workflows/Specs.yml)
|
6
6
|
[![Gem Version](https://img.shields.io/gem/v/cocoapods)](https://rubygems.org/gems/cocoapods)
|
7
7
|
[![Maintainability](https://api.codeclimate.com/v1/badges/8f0fe544baf2ae1acc2b/maintainability)](https://codeclimate.com/github/CocoaPods/CocoaPods/maintainability)
|
8
8
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/8f0fe544baf2ae1acc2b/test_coverage)](https://codeclimate.com/github/CocoaPods/CocoaPods/test_coverage)
|
@@ -72,11 +72,10 @@ CocoaPods is composed of the following projects:
|
|
72
72
|
|
73
73
|
| Status | Project | Description | Info |
|
74
74
|
| :-------- | :------ | :--- | :--- |
|
75
|
-
| [![Build Status](https://
|
76
|
-
| [![Build Status](https://
|
77
|
-
| [![Build Status](https://
|
78
|
-
| [![Build Status](https://
|
79
|
-
| [![Build Status](https://
|
80
|
-
| [![Build Status](https://
|
81
|
-
| [![Build Status](https://img.shields.io/travis/CocoaPods/CocoaPods-app/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CocoaPods-app) | [CocoaPods.app](https://github.com/CocoaPods/CocoaPods-app) | A full-featured and standalone installation of CocoaPods. | [info](https://cocoapods.org/app)
|
75
|
+
| [![Build Status](https://github.com/CocoaPods/CocoaPods/workflows/Specs/badge.svg)](https://github.com/CocoaPods/CocoaPods/actions/workflows/Specs.yml) | [CocoaPods](https://github.com/CocoaPods/CocoaPods) | The CocoaPods command line tool. | [guides](https://guides.cocoapods.org)
|
76
|
+
| [![Build Status](https://github.com/CocoaPods/Core/workflows/Specs/badge.svg)](https://github.com/CocoaPods/Core/actions/workflows/Specs.yml) | [CocoaPods Core](https://github.com/CocoaPods/Core) | Support for working with specifications and podfiles. | [docs](https://guides.cocoapods.org/contributing/components.html)
|
77
|
+
| [![Build Status](https://github.com/CocoaPods/cocoapods-downloader/workflows/Specs/badge.svg)](https://github.com/CocoaPods/cocoapods-downloader/actions/workflows/Specs.yml) |[CocoaPods Downloader](https://github.com/CocoaPods/cocoapods-downloader) | Downloaders for various source types. | [docs](https://www.rubydoc.info/gems/cocoapods-downloader)
|
78
|
+
| [![Build Status](https://github.com/CocoaPods/Xcodeproj/workflows/Specs/badge.svg)](https://github.com/CocoaPods/Xcodeproj/actions/workflows/Specs.yml) | [Xcodeproj](https://github.com/CocoaPods/Xcodeproj) | Create and modify Xcode projects from Ruby. | [docs](https://www.rubydoc.info/gems/xcodeproj)
|
79
|
+
| [![Build Status](https://github.com/CocoaPods/CLAide/workflows/ci/badge.svg)](https://github.com/CocoaPods/CLAide/actions/workflows/ci.yml) | [CLAide](https://github.com/CocoaPods/CLAide) | A small command-line interface framework. | [docs](https://www.rubydoc.info/gems/claide)
|
80
|
+
| [![Build Status](https://github.com/CocoaPods/Molinillo/workflows/test/badge.svg)](https://github.com/CocoaPods/Molinillo/actions/workflows/test.yml) | [Molinillo](https://github.com/CocoaPods/Molinillo) | A powerful generic dependency resolver. | [docs](https://www.rubydoc.info/gems/molinillo)
|
82
81
|
| | [Master Repo ](https://github.com/CocoaPods/Specs) | Master repository of specifications. | [guides](https://guides.cocoapods.org/making/specs-and-specs-repo.html)
|
@@ -38,6 +38,7 @@ module Pod
|
|
38
38
|
['--test-specs=test-spec1,test-spec2,etc', 'List of test specs to run'],
|
39
39
|
['--analyze', 'Validate with the Xcode Static Analysis tool'],
|
40
40
|
['--configuration=CONFIGURATION', 'Build using the given configuration (defaults to Release)'],
|
41
|
+
['--validation-dir', 'The directory to use for validation. If none is specified a temporary directory will be used.'],
|
41
42
|
].concat(super)
|
42
43
|
end
|
43
44
|
|
@@ -63,6 +64,7 @@ module Pod
|
|
63
64
|
@analyze = argv.flag?('analyze', false)
|
64
65
|
@podspecs_paths = argv.arguments!
|
65
66
|
@configuration = argv.option('configuration', nil)
|
67
|
+
@validation_dir = argv.option('validation-dir', nil)
|
66
68
|
super
|
67
69
|
end
|
68
70
|
|
@@ -93,6 +95,7 @@ module Pod
|
|
93
95
|
validator.include_podspecs = @include_podspecs
|
94
96
|
validator.external_podspecs = @external_podspecs
|
95
97
|
validator.configuration = @configuration
|
98
|
+
validator.validation_dir = @validation_dir
|
96
99
|
validator.validate
|
97
100
|
|
98
101
|
unless @clean
|
@@ -38,6 +38,7 @@ module Pod
|
|
38
38
|
'This takes precedence over the Swift versions specified by the spec or a `.swift-version` file'],
|
39
39
|
['--no-overwrite', 'Disallow pushing that would overwrite an existing spec'],
|
40
40
|
['--update-sources', 'Make sure sources are up-to-date before a push'],
|
41
|
+
['--validation-dir', 'The directory to use for validation. If none is specified a temporary directory will be used.'],
|
41
42
|
].concat(super)
|
42
43
|
end
|
43
44
|
|
@@ -59,6 +60,7 @@ module Pod
|
|
59
60
|
@skip_import_validation = argv.flag?('skip-import-validation', false)
|
60
61
|
@skip_tests = argv.flag?('skip-tests', false)
|
61
62
|
@allow_overwrite = argv.flag?('overwrite', true)
|
63
|
+
@validation_dir = argv.option('validation-dir', nil)
|
62
64
|
super
|
63
65
|
end
|
64
66
|
|
@@ -144,6 +146,7 @@ module Pod
|
|
144
146
|
validator.swift_version = @swift_version
|
145
147
|
validator.skip_import_validation = @skip_import_validation
|
146
148
|
validator.skip_tests = @skip_tests
|
149
|
+
validator.validation_dir = @validation_dir
|
147
150
|
begin
|
148
151
|
validator.validate
|
149
152
|
rescue => e
|
@@ -3,10 +3,10 @@ require 'fileutils'
|
|
3
3
|
module Pod
|
4
4
|
class Command
|
5
5
|
class Setup < Command
|
6
|
-
self.summary = '
|
6
|
+
self.summary = 'Set up the CocoaPods environment'
|
7
7
|
|
8
8
|
self.description = <<-DESC
|
9
|
-
|
9
|
+
Set up the CocoaPods environment
|
10
10
|
DESC
|
11
11
|
|
12
12
|
def run
|
@@ -37,6 +37,7 @@ module Pod
|
|
37
37
|
['--test-specs=test-spec1,test-spec2,etc', 'List of test specs to run'],
|
38
38
|
['--analyze', 'Validate with the Xcode Static Analysis tool'],
|
39
39
|
['--configuration=CONFIGURATION', 'Build using the given configuration (defaults to Release)'],
|
40
|
+
['--validation-dir', 'The directory to use for validation. If none is specified a temporary directory will be used.'],
|
40
41
|
].concat(super)
|
41
42
|
end
|
42
43
|
|
@@ -60,6 +61,7 @@ module Pod
|
|
60
61
|
@analyze = argv.flag?('analyze', false)
|
61
62
|
@podspecs_paths = argv.arguments!
|
62
63
|
@configuration = argv.option('configuration', nil)
|
64
|
+
@validation_dir = argv.option('validation-dir', nil)
|
63
65
|
super
|
64
66
|
end
|
65
67
|
|
@@ -84,6 +86,7 @@ module Pod
|
|
84
86
|
validator.test_specs = @test_specs
|
85
87
|
validator.analyze = @analyze
|
86
88
|
validator.configuration = @configuration
|
89
|
+
validator.validation_dir = @validation_dir
|
87
90
|
validator.validate
|
88
91
|
failure_reasons << validator.failure_reason
|
89
92
|
|
data/lib/cocoapods/config.rb
CHANGED
@@ -49,23 +49,23 @@ module Pod
|
|
49
49
|
|
50
50
|
# @!group UI
|
51
51
|
|
52
|
-
# @return [
|
52
|
+
# @return [Boolean] Whether CocoaPods should provide detailed output about the
|
53
53
|
# performed actions.
|
54
54
|
#
|
55
55
|
attr_accessor :verbose
|
56
56
|
alias_method :verbose?, :verbose
|
57
57
|
|
58
|
-
# @return [
|
58
|
+
# @return [Boolean] Whether CocoaPods should produce not output.
|
59
59
|
#
|
60
60
|
attr_accessor :silent
|
61
61
|
alias_method :silent?, :silent
|
62
62
|
|
63
|
-
# @return [
|
63
|
+
# @return [Boolean] Whether CocoaPods is allowed to run as root.
|
64
64
|
#
|
65
65
|
attr_accessor :allow_root
|
66
66
|
alias_method :allow_root?, :allow_root
|
67
67
|
|
68
|
-
# @return [
|
68
|
+
# @return [Boolean] Whether a message should be printed when a new version of
|
69
69
|
# CocoaPods is available.
|
70
70
|
#
|
71
71
|
attr_accessor :new_version_message
|
@@ -75,7 +75,7 @@ module Pod
|
|
75
75
|
|
76
76
|
# @!group Installation
|
77
77
|
|
78
|
-
# @return [
|
78
|
+
# @return [Boolean] Whether the installer should skip the download cache.
|
79
79
|
#
|
80
80
|
attr_accessor :skip_download_cache
|
81
81
|
alias_method :skip_download_cache?, :skip_download_cache
|
data/lib/cocoapods/executable.rb
CHANGED
@@ -36,7 +36,7 @@ module Pod
|
|
36
36
|
# @param [Array<#to_s>] command
|
37
37
|
# The command to send to the binary.
|
38
38
|
#
|
39
|
-
# @param [
|
39
|
+
# @param [Boolean] raise_on_failure
|
40
40
|
# Whether it should raise if the command fails.
|
41
41
|
#
|
42
42
|
# @raise If the executable could not be located.
|
@@ -36,7 +36,7 @@ module Pod
|
|
36
36
|
@can_cache = can_cache
|
37
37
|
end
|
38
38
|
|
39
|
-
# @return [
|
39
|
+
# @return [Boolean] whether an external source source is equal to another
|
40
40
|
# according to the {#name} and to the {#params}.
|
41
41
|
#
|
42
42
|
def ==(other)
|
@@ -84,10 +84,22 @@ module Pod
|
|
84
84
|
elsif license_file = file_accessor(spec).license
|
85
85
|
text = IO.read(license_file)
|
86
86
|
end
|
87
|
+
text = format_license(text)
|
87
88
|
end
|
88
89
|
text
|
89
90
|
end
|
90
91
|
|
92
|
+
# Convenience method for users to format licenses
|
93
|
+
#
|
94
|
+
# @param [String] text
|
95
|
+
# Unformatted license text
|
96
|
+
#
|
97
|
+
# @return [String] Formatted license text
|
98
|
+
#
|
99
|
+
def format_license(text)
|
100
|
+
text
|
101
|
+
end
|
102
|
+
|
91
103
|
protected
|
92
104
|
|
93
105
|
# Returns the file accessor for the given spec.
|
@@ -203,7 +203,7 @@ module Pod
|
|
203
203
|
f << "@import Foundation;\n"
|
204
204
|
f << "@import UIKit;\n" if platform == :ios || platform == :tvos
|
205
205
|
f << "@import Cocoa;\n" if platform == :osx
|
206
|
-
f << "#{import_statement}int main() {}\n"
|
206
|
+
f << "#{import_statement}int main(void) {}\n"
|
207
207
|
end
|
208
208
|
end
|
209
209
|
source_file
|
@@ -59,7 +59,7 @@ module Pod
|
|
59
59
|
:tvos => Version.new('9.0'),
|
60
60
|
}
|
61
61
|
|
62
|
-
# @return [
|
62
|
+
# @return [Boolean] Whether the external strings file is supported by the
|
63
63
|
# `ibtool` according to the deployment target of the platform.
|
64
64
|
#
|
65
65
|
def use_external_strings_file?
|
@@ -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
|
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
|
-
|
97
|
-
|
98
|
-
|
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
|
-
|
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
|
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
|
@@ -112,7 +112,7 @@ module Pod
|
|
112
112
|
'CFBundleSignature' => '????',
|
113
113
|
'CFBundleVersion' => '${CURRENT_PROJECT_VERSION}',
|
114
114
|
'NSPrincipalClass' => '',
|
115
|
-
'CFBundleDevelopmentRegion' => '
|
115
|
+
'CFBundleDevelopmentRegion' => '${PODS_DEVELOPMENT_LANGUAGE}',
|
116
116
|
}
|
117
117
|
|
118
118
|
info['CFBundleExecutable'] = '${EXECUTABLE_NAME}' if bundle_package_type != :bndl
|
@@ -59,14 +59,14 @@ module Pod
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
-
# @return [
|
62
|
+
# @return [Boolean] Whether an installation should be performed or this
|
63
63
|
# CocoaPods project is already up to date.
|
64
64
|
#
|
65
65
|
def needs_install?
|
66
66
|
podfile_needs_install? || sandbox_needs_install?
|
67
67
|
end
|
68
68
|
|
69
|
-
# @return [
|
69
|
+
# @return [Boolean] Whether the podfile has changes respect to the lockfile.
|
70
70
|
#
|
71
71
|
def podfile_needs_install?
|
72
72
|
state = podfile_state
|
@@ -74,7 +74,7 @@ module Pod
|
|
74
74
|
needing_install > 0
|
75
75
|
end
|
76
76
|
|
77
|
-
# @return [
|
77
|
+
# @return [Boolean] Whether the sandbox is in synch with the lockfile.
|
78
78
|
#
|
79
79
|
def sandbox_needs_install?
|
80
80
|
state = sandbox_state
|
@@ -56,7 +56,7 @@ module Pod
|
|
56
56
|
# @note Non library specs are intentionally not included as part of the equality for pod variants since a pod
|
57
57
|
# variant should not be affected by the number of test nor app specs included.
|
58
58
|
#
|
59
|
-
# @return [
|
59
|
+
# @return [Boolean] whether the {PodVariant} is equal to another taking all all their attributes into account
|
60
60
|
#
|
61
61
|
def ==(other)
|
62
62
|
self.class == other.class &&
|