cocoapods 0.38.0 → 0.38.1
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 +4 -4
- data/CHANGELOG.md +45 -2
- data/lib/cocoapods/command/spec/lint.rb +1 -1
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/copy_resources_script.rb +4 -2
- data/lib/cocoapods/generator/module_map.rb +2 -1
- data/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb +20 -12
- data/lib/cocoapods/installer.rb +4 -1
- data/lib/cocoapods/installer/file_references_installer.rb +12 -3
- data/lib/cocoapods/installer/pod_source_installer.rb +16 -20
- data/lib/cocoapods/installer/target_installer/pod_target_installer.rb +53 -6
- data/lib/cocoapods/sandbox/headers_store.rb +29 -7
- data/lib/cocoapods/validator.rb +24 -17
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2478b064fb73530c9c036e28c2c6606b42b7d3b
|
4
|
+
data.tar.gz: 4fac9de32fe421f5da6263aa83e0b3aa0e9c0198
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0eef7db2285e17e364e71446df6c02636f15b58ff8dca4a8a6cf3d52fb0b7b024cac1e6bb5415102d603c1531b9aae61712f54d200eea385816acb1a595d0f0
|
7
|
+
data.tar.gz: 11e7765076e7af986feea1ce1b216c2342a57bca34292eb7844fcb2cf9ad9849fe16b74758c6c63549604da4c541a327cb5d49591ae50f6bfcc5429ad34a714e
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,49 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
|
|
4
4
|
|
5
5
|
To install release candidates run `[sudo] gem install cocoapods --pre`
|
6
6
|
|
7
|
+
## 0.38.1
|
8
|
+
|
9
|
+
##### Enhancements
|
10
|
+
|
11
|
+
* Set project, dylib, and compatibility versions when building pods as
|
12
|
+
frameworks.
|
13
|
+
[Marius Rackwitz](https://github.com/mrackwitz)
|
14
|
+
|
15
|
+
* Pods integrated as static libraries can now be imported as modules.
|
16
|
+
[Tomas Linhart](https://github.com/TomasLinhart)
|
17
|
+
[#3874](https://github.com/CocoaPods/CocoaPods/issues/3874)
|
18
|
+
|
19
|
+
##### Bug Fixes
|
20
|
+
|
21
|
+
* Ensure the aggregate `.xcconfig` file only has the settings for the
|
22
|
+
appropriate build configuration.
|
23
|
+
[Samuel Giddins](https://github.com/segiddins)
|
24
|
+
[#3842](https://github.com/CocoaPods/CocoaPods/issues/3842)
|
25
|
+
|
26
|
+
* Show the correct error when `pod spec lint` finds multiple podspecs, and at
|
27
|
+
least one of them fails linting.
|
28
|
+
[Samuel Giddins](https://github.com/segiddins)
|
29
|
+
[#3869](https://github.com/CocoaPods/CocoaPods/issues/3869)
|
30
|
+
|
31
|
+
* Set header search paths properly on the user target when `vendored_libraries`
|
32
|
+
Pods are used while integrating Pods as frameworks.
|
33
|
+
[Jonathan MacMillan](https://github.com/perotinus)
|
34
|
+
[#3857](https://github.com/CocoaPods/CocoaPods/issues/3857)
|
35
|
+
|
36
|
+
* Only link public headers in the sandbox for Pods that are not being built
|
37
|
+
into dynamic frameworks, when integrating Pods as frameworks.
|
38
|
+
[Jonathan MacMillan](https://github.com/perotinus)
|
39
|
+
[#3867](https://github.com/CocoaPods/CocoaPods/issues/3867)
|
40
|
+
|
41
|
+
* Don't lock resource files, only source files.
|
42
|
+
[Mason Glidden](https://github.com/mglidden)
|
43
|
+
[#3557](https://github.com/CocoaPods/CocoaPods/issues/3557)
|
44
|
+
|
45
|
+
* Fix copying frameworks when integrating with today extensions.
|
46
|
+
[Samuel Giddins](https://github.com/segiddins)
|
47
|
+
[#3819](https://github.com/CocoaPods/CocoaPods/issues/3819)
|
48
|
+
|
49
|
+
|
7
50
|
## 0.38.0
|
8
51
|
|
9
52
|
##### Enhancements
|
@@ -11,14 +54,14 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
|
|
11
54
|
* Improve the message shown when trying to use Swift Pods without frameworks.
|
12
55
|
Now it includes the offending Pods so that the user can take action to remove
|
13
56
|
the Pods, if they don’t want to move to frameworks yet.
|
14
|
-
[#3830](https://github.com/CocoaPods/CocoaPods/pull/3830)
|
15
57
|
[Eloy Durán](https://github.com/alloy)
|
58
|
+
[#3830](https://github.com/CocoaPods/CocoaPods/pull/3830)
|
16
59
|
|
17
60
|
##### Bug Fixes
|
18
61
|
|
19
62
|
* Properly merge the `user_target_xcconfig`s of multiple subspecs.
|
20
|
-
[#3813](https://github.com/CocoaPods/CocoaPods/issues/3813)
|
21
63
|
[Samuel Giddins](https://github.com/segiddins)
|
64
|
+
[#3813](https://github.com/CocoaPods/CocoaPods/issues/3813)
|
22
65
|
|
23
66
|
|
24
67
|
## 0.38.0.beta.2
|
@@ -72,7 +72,7 @@ module Pod
|
|
72
72
|
raise Informative, if count == 1
|
73
73
|
"The spec did not pass validation, due to #{failure_reasons.first}."
|
74
74
|
else
|
75
|
-
"#{
|
75
|
+
"#{failure_reasons.count} out of #{count} specs failed validation."
|
76
76
|
end
|
77
77
|
end
|
78
78
|
podspecs_tmp_dir.rmtree if podspecs_tmp_dir.exist?
|
@@ -106,7 +106,7 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
|
|
106
106
|
XCASSET_FILES=()
|
107
107
|
|
108
108
|
realpath() {
|
109
|
-
DIRECTORY
|
109
|
+
DIRECTORY="$(cd "${1%/*}" && pwd)"
|
110
110
|
FILENAME="${1##*/}"
|
111
111
|
echo "$DIRECTORY/$FILENAME"
|
112
112
|
}
|
@@ -119,7 +119,7 @@ install_resource()
|
|
119
119
|
ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\"$1\\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
|
120
120
|
;;
|
121
121
|
*\.xib)
|
122
|
-
|
122
|
+
echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\"$1\\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
|
123
123
|
ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\"$1\\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
|
124
124
|
;;
|
125
125
|
*.framework)
|
@@ -158,8 +158,10 @@ EOS
|
|
158
158
|
|
159
159
|
RSYNC_CALL = <<EOS
|
160
160
|
|
161
|
+
mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
161
162
|
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
162
163
|
if [[ "${ACTION}" == "install" ]]; then
|
164
|
+
mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
163
165
|
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
164
166
|
fi
|
165
167
|
rm -f "$RESOURCES_TO_COPY"
|
@@ -42,8 +42,9 @@ module Pod
|
|
42
42
|
# @return [String]
|
43
43
|
#
|
44
44
|
def generate
|
45
|
+
module_declaration_qualifier = target.requires_frameworks? ? 'framework ' : ''
|
45
46
|
result = <<-eos.strip_heredoc
|
46
|
-
|
47
|
+
#{module_declaration_qualifier}module #{target.product_module_name} {
|
47
48
|
umbrella header "#{target.umbrella_header_path.basename}"
|
48
49
|
|
49
50
|
export *
|
@@ -8,13 +8,16 @@ module Pod
|
|
8
8
|
#
|
9
9
|
attr_reader :target
|
10
10
|
|
11
|
+
# @return [String] the name of the build configuration to generate this
|
12
|
+
# xcconfig for.
|
13
|
+
#
|
14
|
+
attr_reader :configuration_name
|
15
|
+
|
11
16
|
# Initialize a new instance
|
12
17
|
#
|
13
18
|
# @param [Target] target @see target
|
14
19
|
#
|
15
|
-
# @param [String] configuration_name
|
16
|
-
# The name of the build configuration to generate this xcconfig
|
17
|
-
# for.
|
20
|
+
# @param [String] configuration_name @see configuration_name
|
18
21
|
#
|
19
22
|
def initialize(target, configuration_name)
|
20
23
|
@target = target
|
@@ -50,7 +53,7 @@ module Pod
|
|
50
53
|
#
|
51
54
|
def generate
|
52
55
|
includes_static_libs = !target.requires_frameworks?
|
53
|
-
includes_static_libs ||=
|
56
|
+
includes_static_libs ||= pod_targets.flat_map(&:file_accessors).any? { |fa| !fa.vendored_libraries.empty? }
|
54
57
|
config = {
|
55
58
|
'OTHER_LDFLAGS' => '$(inherited) ' + XCConfigHelper.default_ld_flags(target, includes_static_libs),
|
56
59
|
'PODS_ROOT' => target.relative_pods_root,
|
@@ -90,8 +93,7 @@ module Pod
|
|
90
93
|
#
|
91
94
|
def generate_settings_to_import_pod_targets
|
92
95
|
if target.requires_frameworks?
|
93
|
-
|
94
|
-
header_search_paths = target.pod_targets.map do |target|
|
96
|
+
framework_header_search_paths = pod_targets.select(&:should_build?).map do |target|
|
95
97
|
if target.scoped?
|
96
98
|
"$PODS_FRAMEWORK_BUILD_PATH/#{target.product_name}/Headers"
|
97
99
|
else
|
@@ -100,10 +102,16 @@ module Pod
|
|
100
102
|
end
|
101
103
|
build_settings = {
|
102
104
|
'PODS_FRAMEWORK_BUILD_PATH' => target.scoped_configuration_build_dir,
|
103
|
-
# Make headers discoverable by `import "…"`
|
104
|
-
'OTHER_CFLAGS' => '$(inherited) ' + XCConfigHelper.quote(
|
105
|
+
# Make framework headers discoverable by `import "…"`
|
106
|
+
'OTHER_CFLAGS' => '$(inherited) ' + XCConfigHelper.quote(framework_header_search_paths, '-iquote'),
|
105
107
|
}
|
106
|
-
if
|
108
|
+
if pod_targets.any? { |t| !t.should_build? }
|
109
|
+
# Make library headers discoverale by `#import "…"`
|
110
|
+
library_header_search_paths = target.sandbox.public_headers.search_paths(target.platform)
|
111
|
+
build_settings['HEADER_SEARCH_PATHS'] = XCConfigHelper.quote(library_header_search_paths)
|
112
|
+
build_settings['OTHER_CFLAGS'] += XCConfigHelper.quote(library_header_search_paths, '-isystem')
|
113
|
+
end
|
114
|
+
if pod_targets.any? { |t| t.should_build? && t.scoped? }
|
107
115
|
build_settings['FRAMEWORK_SEARCH_PATHS'] = '$(inherited) "$PODS_FRAMEWORK_BUILD_PATH"'
|
108
116
|
end
|
109
117
|
@xcconfig.merge!(build_settings)
|
@@ -130,7 +138,7 @@ module Pod
|
|
130
138
|
# user target.
|
131
139
|
#
|
132
140
|
def generate_vendored_build_settings
|
133
|
-
|
141
|
+
pod_targets.each do |pod_target|
|
134
142
|
unless pod_target.should_build? && pod_target.requires_frameworks?
|
135
143
|
XCConfigHelper.add_settings_for_file_accessors_of_target(pod_target, @xcconfig)
|
136
144
|
end
|
@@ -141,7 +149,7 @@ module Pod
|
|
141
149
|
# with the user’s project.
|
142
150
|
#
|
143
151
|
def generate_other_ld_flags
|
144
|
-
other_ld_flags =
|
152
|
+
other_ld_flags = pod_targets.select(&:should_build?).map do |pod_target|
|
145
153
|
if pod_target.requires_frameworks?
|
146
154
|
%(-framework "#{pod_target.product_basename}")
|
147
155
|
else
|
@@ -191,7 +199,7 @@ module Pod
|
|
191
199
|
# @return [Array<PodTarget>]
|
192
200
|
#
|
193
201
|
def pod_targets
|
194
|
-
target.pod_targets_for_build_configuration(
|
202
|
+
target.pod_targets_for_build_configuration(configuration_name)
|
195
203
|
end
|
196
204
|
|
197
205
|
# Returns the +user_target_xcconfig+ for all pod targets and their spec
|
data/lib/cocoapods/installer.rb
CHANGED
@@ -346,7 +346,10 @@ module Pod
|
|
346
346
|
def lock_pod_sources
|
347
347
|
return unless config.lock_pod_source?
|
348
348
|
return unless @pod_installers
|
349
|
-
@pod_installers.each
|
349
|
+
@pod_installers.each do |installer|
|
350
|
+
pod_target = pod_targets.find { |target| target.pod_name == installer.name }
|
351
|
+
installer.lock_files!(pod_target.file_accessors)
|
352
|
+
end
|
350
353
|
end
|
351
354
|
|
352
355
|
# Determines if the dependencies need to be built as dynamic frameworks or
|
@@ -118,14 +118,23 @@ module Pod
|
|
118
118
|
framework_exp = /\.framework\//
|
119
119
|
headers_sandbox = Pathname.new(file_accessor.spec.root.name)
|
120
120
|
pod_target.build_headers.add_search_path(headers_sandbox, pod_target.platform)
|
121
|
-
|
121
|
+
|
122
|
+
# When integrating Pod as frameworks, built Pods are built into
|
123
|
+
# frameworks, whose headers are included inside the built
|
124
|
+
# framework. Those headers do not need to be linked from the
|
125
|
+
# sandbox.
|
126
|
+
unless pod_target.requires_frameworks? && pod_target.should_build?
|
127
|
+
sandbox.public_headers.add_search_path(headers_sandbox, pod_target.platform)
|
128
|
+
end
|
122
129
|
|
123
130
|
header_mappings(headers_sandbox, file_accessor, file_accessor.headers).each do |namespaced_path, files|
|
124
131
|
pod_target.build_headers.add_files(namespaced_path, files.reject { |f| f.to_path =~ framework_exp }, pod_target.platform)
|
125
132
|
end
|
126
133
|
|
127
|
-
|
128
|
-
|
134
|
+
unless pod_target.requires_frameworks? && pod_target.should_build?
|
135
|
+
header_mappings(headers_sandbox, file_accessor, file_accessor.public_headers).each do |namespaced_path, files|
|
136
|
+
sandbox.public_headers.add_files(namespaced_path, files.reject { |f| f.to_path =~ framework_exp }, pod_target.platform)
|
137
|
+
end
|
129
138
|
end
|
130
139
|
|
131
140
|
vendored_frameworks_header_mappings(headers_sandbox, file_accessor).each do |namespaced_path, files|
|
@@ -33,6 +33,12 @@ module Pod
|
|
33
33
|
"<#{self.class} sandbox=#{sandbox.root} pod=#{root_spec.name}"
|
34
34
|
end
|
35
35
|
|
36
|
+
# @return [String] The name of the pod this installer is installing.
|
37
|
+
#
|
38
|
+
def name
|
39
|
+
root_spec.name
|
40
|
+
end
|
41
|
+
|
36
42
|
#-----------------------------------------------------------------------#
|
37
43
|
|
38
44
|
public
|
@@ -66,8 +72,16 @@ module Pod
|
|
66
72
|
#
|
67
73
|
# @return [void]
|
68
74
|
#
|
69
|
-
def lock_files!
|
70
|
-
|
75
|
+
def lock_files!(file_accessors)
|
76
|
+
return if local?
|
77
|
+
|
78
|
+
file_accessors.each do |file_accessor|
|
79
|
+
file_accessor.source_files.each do |source_file|
|
80
|
+
next unless source_file.exist?
|
81
|
+
new_permissions = source_file.stat.mode & ~0222
|
82
|
+
source_file.chmod(new_permissions)
|
83
|
+
end
|
84
|
+
end
|
71
85
|
end
|
72
86
|
|
73
87
|
# @return [Hash] @see Downloader#checkout_options
|
@@ -102,24 +116,6 @@ module Pod
|
|
102
116
|
)
|
103
117
|
end
|
104
118
|
|
105
|
-
# Locks all of the files in this pod (source, license, etc). This will
|
106
|
-
# cause Xcode to warn you if you try to accidently edit one of the files.
|
107
|
-
#
|
108
|
-
# @return [void]
|
109
|
-
#
|
110
|
-
def lock_installation
|
111
|
-
# We don't want to lock diretories, as that forces you to override
|
112
|
-
# those permissions if you decide to delete the Pods folder.
|
113
|
-
Dir.glob(root + '**/*').each do |file|
|
114
|
-
if File.file?(file)
|
115
|
-
# Only remove write permission, since some pods (like Crashlytics)
|
116
|
-
# have executable files.
|
117
|
-
new_permissions = File.stat(file).mode & ~0222
|
118
|
-
File.chmod(new_permissions, file)
|
119
|
-
end
|
120
|
-
end
|
121
|
-
end
|
122
|
-
|
123
119
|
# Removes all the files not needed for the installation according to the
|
124
120
|
# specs by platform.
|
125
121
|
#
|
@@ -22,13 +22,15 @@ module Pod
|
|
22
22
|
create_xcconfig_file
|
23
23
|
if target.requires_frameworks?
|
24
24
|
create_info_plist_file
|
25
|
-
create_module_map do |generator|
|
26
|
-
generator.private_headers += target.file_accessors.flat_map(&:private_headers).map(&:basename)
|
27
|
-
end
|
28
|
-
create_umbrella_header do |generator|
|
29
|
-
generator.imports += target.file_accessors.flat_map(&:public_headers).map(&:basename)
|
30
|
-
end
|
31
25
|
end
|
26
|
+
create_module_map do |generator|
|
27
|
+
generator.private_headers += target.file_accessors.flat_map(&:private_headers).map(&:basename)
|
28
|
+
end
|
29
|
+
create_umbrella_header do |generator|
|
30
|
+
generator.imports += target.file_accessors.flat_map(&:public_headers).map(&:basename)
|
31
|
+
end
|
32
|
+
link_module_map
|
33
|
+
link_umbrella_header
|
32
34
|
create_prefix_header
|
33
35
|
create_dummy_source
|
34
36
|
end
|
@@ -36,6 +38,24 @@ module Pod
|
|
36
38
|
|
37
39
|
private
|
38
40
|
|
41
|
+
# Adds the project/library and compatibility versions, which are only
|
42
|
+
# applicable to dynamic libraries.
|
43
|
+
#
|
44
|
+
# @return [Hash{String => String}]
|
45
|
+
#
|
46
|
+
def custom_build_settings
|
47
|
+
settings = super
|
48
|
+
if target.requires_frameworks?
|
49
|
+
version = target.root_spec.version
|
50
|
+
compatibility_version = version.segments.first
|
51
|
+
compatibility_version = version.version if compatibility_version < 1
|
52
|
+
settings['CURRENT_PROJECT_VERSION'] = version.version
|
53
|
+
settings['DYLIB_COMPATIBILITY_VERSION'] = compatibility_version.to_s
|
54
|
+
settings['DYLIB_CURRENT_VERSION'] = '$(CURRENT_PROJECT_VERSION)'
|
55
|
+
end
|
56
|
+
settings
|
57
|
+
end
|
58
|
+
|
39
59
|
#-----------------------------------------------------------------------#
|
40
60
|
|
41
61
|
SOURCE_FILE_EXTENSIONS = Sandbox::FileAccessor::SOURCE_FILE_EXTENSIONS
|
@@ -165,6 +185,27 @@ module Pod
|
|
165
185
|
end
|
166
186
|
end
|
167
187
|
|
188
|
+
# Links a module map to Public headers.
|
189
|
+
#
|
190
|
+
# @return [void]
|
191
|
+
#
|
192
|
+
def link_module_map
|
193
|
+
return if target.requires_frameworks? && target.should_build?
|
194
|
+
|
195
|
+
sandbox.public_headers.add_file(target.name, target.module_map_path, 'module.modulemap', target.platform)
|
196
|
+
end
|
197
|
+
|
198
|
+
# Links a an umbrella header to Public headers.
|
199
|
+
#
|
200
|
+
# @return [void]
|
201
|
+
#
|
202
|
+
def link_umbrella_header
|
203
|
+
return if custom_module_map
|
204
|
+
return if target.requires_frameworks? && target.should_build?
|
205
|
+
|
206
|
+
sandbox.public_headers.add_files(target.name, [target.umbrella_header_path], target.platform)
|
207
|
+
end
|
208
|
+
|
168
209
|
# Creates a prefix header file which imports `UIKit` or `Cocoa` according
|
169
210
|
# to the platform of the target. This file also include any prefix header
|
170
211
|
# content reported by the specification of the pods.
|
@@ -262,6 +303,12 @@ module Pod
|
|
262
303
|
FileUtils.cp(custom_module_map, path)
|
263
304
|
add_file_to_support_group(path)
|
264
305
|
|
306
|
+
unless target.requires_frameworks?
|
307
|
+
contents = path.read
|
308
|
+
contents.gsub!(/^\s*framework\s+module/, 'module')
|
309
|
+
path.open('w') { |f| f.write(contents) }
|
310
|
+
end
|
311
|
+
|
265
312
|
native_target.build_configurations.each do |c|
|
266
313
|
relative_path = path.relative_path_from(sandbox.root)
|
267
314
|
c.build_settings['MODULEMAP_FILE'] = relative_path.to_s
|
@@ -71,18 +71,40 @@ module Pod
|
|
71
71
|
# @return [Array<Pathname>]
|
72
72
|
#
|
73
73
|
def add_files(namespace, relative_header_paths, platform)
|
74
|
+
relative_header_paths.map do |relative_header_path|
|
75
|
+
add_file(namespace, relative_header_path, relative_header_path.basename, platform)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Adds a header to the directory under different name.
|
80
|
+
#
|
81
|
+
# @param [Pathname] namespace
|
82
|
+
# the path where the header file should be stored relative to the
|
83
|
+
# headers directory.
|
84
|
+
#
|
85
|
+
# @param [Pathname] relative_header_path
|
86
|
+
# the path of the header file relative to the Pods project
|
87
|
+
# (`PODS_ROOT` variable of the xcconfigs).
|
88
|
+
#
|
89
|
+
# @param [String] final_name
|
90
|
+
# the name under which the file should be available in the
|
91
|
+
# headers directory.
|
92
|
+
#
|
93
|
+
# @note This method adds the file to the search paths.
|
94
|
+
#
|
95
|
+
# @return [Pathname]
|
96
|
+
#
|
97
|
+
def add_file(namespace, relative_header_path, final_name, platform)
|
74
98
|
add_search_path(namespace, platform)
|
75
99
|
namespaced_path = root + namespace
|
76
100
|
namespaced_path.mkpath unless File.exist?(namespaced_path)
|
77
101
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
FileUtils.ln_sf(source, relative_header_path.basename)
|
83
|
-
end
|
84
|
-
namespaced_path + relative_header_path.basename
|
102
|
+
absolute_source = (sandbox.root + relative_header_path)
|
103
|
+
source = absolute_source.relative_path_from(namespaced_path)
|
104
|
+
Dir.chdir(namespaced_path) do
|
105
|
+
FileUtils.ln_sf(source, final_name)
|
85
106
|
end
|
107
|
+
namespaced_path + relative_header_path.basename
|
86
108
|
end
|
87
109
|
|
88
110
|
# Adds an header search path to the sandbox.
|
data/lib/cocoapods/validator.rb
CHANGED
@@ -244,15 +244,19 @@ module Pod
|
|
244
244
|
UI.message "\n\n#{spec} - Analyzing on #{platform} platform.".green.reversed
|
245
245
|
@consumer = spec.consumer(platform)
|
246
246
|
setup_validation_environment
|
247
|
+
download_pod
|
248
|
+
check_file_patterns
|
247
249
|
install_pod
|
248
250
|
validate_vendored_dynamic_frameworks
|
249
251
|
build_pod
|
250
|
-
check_file_patterns
|
251
252
|
tear_down_validation_environment
|
252
253
|
validated?
|
253
254
|
end
|
254
255
|
return false if fail_fast && !valid
|
255
256
|
perform_extensive_subspec_analysis(spec) unless @no_subspecs
|
257
|
+
rescue => e
|
258
|
+
error('unknown', "Encountered an unknown error (#{e}) during validation.")
|
259
|
+
false
|
256
260
|
end
|
257
261
|
|
258
262
|
# Recursively perform the extensive analysis on all subspecs
|
@@ -334,29 +338,33 @@ module Pod
|
|
334
338
|
Config.instance = @original_config
|
335
339
|
end
|
336
340
|
|
341
|
+
def download_pod
|
342
|
+
deployment_target = spec.subspec_by_name(subspec_name).deployment_target(consumer.platform_name)
|
343
|
+
podfile = podfile_from_spec(consumer.platform_name, deployment_target, use_frameworks)
|
344
|
+
sandbox = Sandbox.new(config.sandbox_root)
|
345
|
+
@installer = Installer.new(sandbox, podfile)
|
346
|
+
@installer.use_default_plugins = false
|
347
|
+
%i(prepare resolve_dependencies download_dependencies).each { |m| @installer.send(m) }
|
348
|
+
@file_accessor = @installer.pod_targets.flat_map(&:file_accessors).find { |fa| fa.spec.name == consumer.spec.name }
|
349
|
+
end
|
350
|
+
|
337
351
|
# It creates a podfile in memory and builds a library containing the pod
|
338
352
|
# for all available platforms with xcodebuild.
|
339
353
|
#
|
340
354
|
def install_pod
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
installer.use_default_plugins = false
|
346
|
-
installer.install!
|
355
|
+
%i(determine_dependency_product_types verify_no_duplicate_framework_names
|
356
|
+
verify_no_static_framework_transitive_dependencies
|
357
|
+
verify_framework_usage generate_pods_project
|
358
|
+
perform_post_install_actions).each { |m| @installer.send(m) }
|
347
359
|
|
348
|
-
|
360
|
+
deployment_target = spec.subspec_by_name(subspec_name).deployment_target(consumer.platform_name)
|
361
|
+
@installer.aggregate_targets.each do |target|
|
349
362
|
if target.pod_targets.any?(&:uses_swift?) && consumer.platform_name == :ios &&
|
350
363
|
(deployment_target.nil? || Version.new(deployment_target).major < 8)
|
351
364
|
uses_xctest = target.spec_consumers.any? { |c| (c.frameworks + c.weak_frameworks).include? 'XCTest' }
|
352
365
|
error('swift', 'Swift support uses dynamic frameworks and is therefore only supported on iOS > 8.') unless uses_xctest
|
353
366
|
end
|
354
|
-
|
355
|
-
target.pod_targets.map(&:file_accessors)
|
356
|
-
end.flatten
|
357
|
-
|
358
|
-
@file_accessor = file_accessors.find { |accessor| accessor.spec.root.name == spec.root.name }
|
359
|
-
config.silent
|
367
|
+
end
|
360
368
|
end
|
361
369
|
|
362
370
|
def validate_vendored_dynamic_frameworks
|
@@ -546,11 +554,11 @@ module Pod
|
|
546
554
|
# in local mode.
|
547
555
|
#
|
548
556
|
def podfile_from_spec(platform_name, deployment_target, use_frameworks = true)
|
549
|
-
name = subspec_name
|
557
|
+
name = subspec_name || spec.name
|
550
558
|
podspec = file.realpath
|
551
559
|
local = local?
|
552
560
|
urls = source_urls
|
553
|
-
|
561
|
+
Pod::Podfile.new do
|
554
562
|
urls.each { |u| source(u) }
|
555
563
|
use_frameworks!(use_frameworks)
|
556
564
|
platform(platform_name, deployment_target)
|
@@ -560,7 +568,6 @@ module Pod
|
|
560
568
|
pod name, :podspec => podspec.to_s
|
561
569
|
end
|
562
570
|
end
|
563
|
-
podfile
|
564
571
|
end
|
565
572
|
|
566
573
|
# Parse the xcode build output to identify the lines which are relevant
|
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: 0.38.
|
4
|
+
version: 0.38.1
|
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: 2015-07-
|
14
|
+
date: 2015-07-23 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: 0.38.
|
22
|
+
version: 0.38.1
|
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: 0.38.
|
29
|
+
version: 0.38.1
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: claide
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,14 +131,14 @@ dependencies:
|
|
131
131
|
requirements:
|
132
132
|
- - ~>
|
133
133
|
- !ruby/object:Gem::Version
|
134
|
-
version: 0.3.
|
134
|
+
version: 0.3.1
|
135
135
|
type: :runtime
|
136
136
|
prerelease: false
|
137
137
|
version_requirements: !ruby/object:Gem::Requirement
|
138
138
|
requirements:
|
139
139
|
- - ~>
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version: 0.3.
|
141
|
+
version: 0.3.1
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
143
|
name: colored
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|