cocoapods 1.8.4 → 1.9.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +69 -1
  3. data/lib/cocoapods.rb +1 -0
  4. data/lib/cocoapods/command/setup.rb +1 -0
  5. data/lib/cocoapods/executable.rb +1 -1
  6. data/lib/cocoapods/gem_version.rb +1 -1
  7. data/lib/cocoapods/generator/embed_frameworks_script.rb +36 -6
  8. data/lib/cocoapods/generator/prepare_artifacts_script.rb +244 -0
  9. data/lib/cocoapods/installer.rb +6 -5
  10. data/lib/cocoapods/installer/analyzer.rb +137 -59
  11. data/lib/cocoapods/installer/analyzer/pod_variant.rb +27 -12
  12. data/lib/cocoapods/installer/analyzer/pod_variant_set.rb +11 -2
  13. data/lib/cocoapods/installer/project_cache/project_cache_analyzer.rb +10 -2
  14. data/lib/cocoapods/installer/project_cache/project_installation_cache.rb +15 -2
  15. data/lib/cocoapods/installer/project_cache/target_cache_key.rb +7 -5
  16. data/lib/cocoapods/installer/user_project_integrator.rb +1 -10
  17. data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +100 -19
  18. data/lib/cocoapods/installer/xcode/pods_project_generator.rb +3 -0
  19. data/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb +29 -4
  20. data/lib/cocoapods/installer/xcode/pods_project_generator/app_host_installer.rb +7 -2
  21. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb +106 -45
  22. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb +68 -1
  23. data/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb +29 -14
  24. data/lib/cocoapods/sandbox/file_accessor.rb +32 -21
  25. data/lib/cocoapods/sources_manager.rb +9 -2
  26. data/lib/cocoapods/target.rb +11 -14
  27. data/lib/cocoapods/target/aggregate_target.rb +78 -18
  28. data/lib/cocoapods/target/build_settings.rb +64 -31
  29. data/lib/cocoapods/target/pod_target.rb +236 -87
  30. data/lib/cocoapods/user_interface/error_report.rb +14 -4
  31. data/lib/cocoapods/validator.rb +2 -0
  32. data/lib/cocoapods/xcode.rb +7 -0
  33. data/lib/cocoapods/{target → xcode}/framework_paths.rb +14 -1
  34. data/lib/cocoapods/xcode/linkage_analyzer.rb +22 -0
  35. data/lib/cocoapods/xcode/xcframework.rb +81 -0
  36. data/lib/cocoapods/xcode/xcframework/xcframework_slice.rb +51 -0
  37. metadata +12 -8
  38. data/lib/cocoapods/target/build_type.rb +0 -139
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57b1de10bba3e948a5169dfaeb1efd904e75dee4cde6bd7218440977930865ff
4
- data.tar.gz: 281189ca4c47e468265a5d541c62046404a3b437b8a097be68dd3c831c4c6018
3
+ metadata.gz: 521b794e3dc3aa05b76deb9caa3559045361ba232e2461e45c2900349ee1afd2
4
+ data.tar.gz: ed3444398cc7fd18a2457a52537d7549f56f14b90326d08f365f47f6279d1b69
5
5
  SHA512:
6
- metadata.gz: 1dcb8e86b473bbfd6e4f7675fde3aad7c6c47f0f7812ced0d20ff337951c90588a44034ff0773236a4a6593e75a090a24ad44fd7a326a95174dbe2839ed01e7f
7
- data.tar.gz: c952e35ebae9304ecef0cbe70ab64f4fd53981220cbab84fd1bd32c9bb976bbabe28ab6c3bca47f1ca52bec5f4d23eeb6fc341cdeca0d2207436c5fbc2bac6b3
6
+ metadata.gz: 7e87b619e2dec763de038479a343f52814db87d83900530da5f7981b25670f1270a75f730e8e190b1fba534bb314401405cfd9f190f6f005b55bfbdb1d882635
7
+ data.tar.gz: b34bd41b5b41318a4c82883995cf7e75ab3eccc344171b87c9b07b31a47a058952ac94057e5a60b27f798cb3e8a4036129a7cd78a2f9b2e8d6676e657ed58082
@@ -4,6 +4,74 @@ 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
+ ## 1.9.0.beta.1 (2019-12-16)
8
+
9
+ ##### Enhancements
10
+
11
+ * Support for scheme code coverage.
12
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
13
+ [#8921](https://github.com/CocoaPods/CocoaPods/issues/8921)
14
+
15
+ * Support Swift version variants.
16
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
17
+ [#9230](https://github.com/CocoaPods/CocoaPods/pull/9230)
18
+
19
+ * Configure dependencies per configuration.
20
+ [Samuel Giddins](https://github.com/segiddins)
21
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
22
+ [#9149](https://github.com/CocoaPods/CocoaPods/pull/9149)
23
+
24
+ * Include Podfile Plugin changes for incremental installation.
25
+ [Sebastian Shanus](https://github.com/sebastianv1)
26
+ [#9147](https://github.com/CocoaPods/CocoaPods/pull/9147)
27
+
28
+ * Integrate `use_frameworks!` linkage DSL.
29
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
30
+ [#9099](https://github.com/CocoaPods/CocoaPods/issues/9099)
31
+
32
+ * Add support for integrating dependency file in user script phases.
33
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
34
+ [#9082](https://github.com/CocoaPods/CocoaPods/issues/9082)
35
+
36
+ * Add support for XCFrameworks using the `vendored_frameworks` Podspec DSL.
37
+ [Eric Amorde](https://github.com/amorde)
38
+ [#9148](https://github.com/CocoaPods/CocoaPods/issues/9148)
39
+
40
+ ##### Bug Fixes
41
+
42
+ * Move `run_podfile_post_install_hooks` call to execute right before projects are saved.
43
+ [Yusuf Sobh](https://github.com/yusufoos)
44
+ [#9379](https://github.com/CocoaPods/CocoaPods/issues/9379)
45
+
46
+ * Do not apply header mapping copy if the spec does not provide a header mappings dir.
47
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
48
+ [#9308](https://github.com/CocoaPods/CocoaPods/issues/9308)
49
+
50
+ * Fix issue where workspace was missing user project references during incremental installation.
51
+ [Sebastian Shanus](https://github.com/sebastianv1)
52
+ [#9237](https://github.com/CocoaPods/CocoaPods/issues/9237)
53
+
54
+ * Search in users xcconfig's for figuring out when to set `APPLICATION_EXTENSION_API_ONLY`.
55
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
56
+ [#9233](https://github.com/CocoaPods/CocoaPods/issues/9233)
57
+
58
+ * Always generate a lockfile even if project integration is disabled.
59
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
60
+ [#9288](https://github.com/CocoaPods/CocoaPods/issues/9288)
61
+
62
+ * Fix incremental installation with plugins that include arguments with different ordering.
63
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
64
+ [#9170](https://github.com/CocoaPods/CocoaPods/pull/9170)
65
+
66
+ * Move custom `Copy Headers` script phase for header mappings before `Compile Sources`.
67
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
68
+ [#9131](https://github.com/CocoaPods/CocoaPods/pull/9131)
69
+
70
+ * Don't create a conflicting `LaunchScreen.storyboard` when an app spec contains a file
71
+ with that name in its `resources`.
72
+ [Samuel Giddins](https://github.com/segiddins)
73
+
74
+
7
75
  ## 1.8.4 (2019-10-16)
8
76
 
9
77
  ##### Enhancements
@@ -50,7 +118,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
50
118
 
51
119
  * Include dependent vendored frameworks in linker flags
52
120
  [Alex Coomans](https://github.com/drcapulet)
53
- [#9045]((https://github.com/CocoaPods/CocoaPods/pull/9045)
121
+ [#9045](https://github.com/CocoaPods/CocoaPods/pull/9045)
54
122
 
55
123
  * Correctly set deployment target for non library specs even if the root spec does not specify one.
56
124
  [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
@@ -62,6 +62,7 @@ module Pod
62
62
  autoload :CopyResourcesScript, 'cocoapods/generator/copy_resources_script'
63
63
  autoload :DummySource, 'cocoapods/generator/dummy_source'
64
64
  autoload :EmbedFrameworksScript, 'cocoapods/generator/embed_frameworks_script'
65
+ autoload :PrepareArtifactsScript, 'cocoapods/generator/prepare_artifacts_script'
65
66
  autoload :FileList, 'cocoapods/generator/file_list'
66
67
  autoload :Header, 'cocoapods/generator/header'
67
68
  autoload :InfoPlistFile, 'cocoapods/generator/info_plist_file'
@@ -11,6 +11,7 @@ module Pod
11
11
 
12
12
  def run
13
13
  # Right now, no setup is needed
14
+ UI.puts 'Setup completed'.green
14
15
  end
15
16
  end
16
17
  end
@@ -163,7 +163,7 @@ module Pod
163
163
  status = result.last
164
164
  unless status.success?
165
165
  output = result[0..-2].join
166
- raise Informative, "#{bin} #{command.join(' ')}\n\n#{output}".strip
166
+ raise Informative, "#{executable} #{command.join(' ')}\n\n#{output}".strip
167
167
  end
168
168
  end
169
169
  end
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.8.4'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.9.0.beta.1'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -1,4 +1,4 @@
1
- require 'cocoapods/target/framework_paths'
1
+ require 'cocoapods/xcode'
2
2
 
3
3
  module Pod
4
4
  module Generator
@@ -91,8 +91,8 @@ module Pod
91
91
  fi
92
92
 
93
93
  # Use filter instead of exclude so missing patterns don't throw errors.
94
- echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" --filter \\"- Headers\\" --filter \\"- PrivateHeaders\\" --filter \\"- Modules\\" \\"${source}\\" \\"${destination}\\""
95
- rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
94
+ echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" --filter \\"- Headers\\" --filter \\"- PrivateHeaders\\" --filter \\"- Modules\\" \\"${source}\\" \\"${destination}\\""
95
+ rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
96
96
 
97
97
  local basename
98
98
  basename="$(basename -s .framework "$1")"
@@ -145,8 +145,8 @@ module Pod
145
145
 
146
146
  if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
147
147
  # Move the stripped file into its final destination.
148
- echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" --filter \\"- Headers\\" --filter \\"- PrivateHeaders\\" --filter \\"- Modules\\" \\"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\\" \\"${DWARF_DSYM_FOLDER_PATH}\\""
149
- rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
148
+ echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" --filter \\"- Headers\\" --filter \\"- PrivateHeaders\\" --filter \\"- Modules\\" \\"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\\" \\"${DWARF_DSYM_FOLDER_PATH}\\""
149
+ rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
150
150
  else
151
151
  # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
152
152
  touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM"
@@ -204,8 +204,38 @@ module Pod
204
204
  STRIP_BINARY_RETVAL=1
205
205
  }
206
206
 
207
+ install_artifact() {
208
+ artifact="$1"
209
+ base="$(basename "$artifact")"
210
+ case $base in
211
+ *.framework)
212
+ install_framework "$artifact"
213
+ ;;
214
+ *.dSYM)
215
+ install_dsym "$artifact"
216
+ ;;
217
+ *.bcsymbolmap)
218
+ install_bcsymbolmap "$artifact"
219
+ ;;
220
+ *)
221
+ echo "error: Unrecognized artifact "$artifact""
222
+ ;;
223
+ esac
224
+ }
225
+
226
+ copy_artifacts() {
227
+ file_list="$1"
228
+ while read artifact; do
229
+ install_artifact "$artifact"
230
+ done <$file_list
231
+ }
232
+
233
+ ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt"
234
+ if [ -r "${ARTIFACT_LIST_FILE}" ]; then
235
+ copy_artifacts "${ARTIFACT_LIST_FILE}"
236
+ fi
237
+
207
238
  SH
208
- script << "\n" unless frameworks_by_config.each_value.all?(&:empty?)
209
239
  frameworks_by_config.each do |config, frameworks_with_dsyms|
210
240
  next if frameworks_with_dsyms.empty?
211
241
  script << %(if [[ "$CONFIGURATION" == "#{config}" ]]; then\n)
@@ -0,0 +1,244 @@
1
+ require 'cocoapods/xcode'
2
+
3
+ module Pod
4
+ module Generator
5
+ class PrepareArtifactsScript
6
+ # @return [Hash{String => Array<Pod::Xcode::XCFramework>}] Multiple lists of xcframeworks per
7
+ # configuration.
8
+ #
9
+ attr_reader :xcframeworks_by_config
10
+
11
+ # @return [Pathname] the root directory of the sandbox
12
+ #
13
+ attr_reader :sandbox_root
14
+
15
+ # @return [Platform] the platform of the target for which this script will run
16
+ #
17
+ attr_reader :platform
18
+
19
+ # @param [Hash{String => Array<Pod::Xcode::XCFramework>] xcframeworks_by_config
20
+ # @see #xcframeworks_by_config
21
+ #
22
+ # @param [Pathname] sandbox_root
23
+ # the sandbox root of the installation
24
+ #
25
+ # @param [Platform] platform
26
+ # the platform of the target for which this script will run
27
+ #
28
+ def initialize(xcframeworks_by_config, sandbox_root, platform)
29
+ @xcframeworks_by_config = xcframeworks_by_config
30
+ @sandbox_root = sandbox_root
31
+ @platform = platform
32
+ end
33
+
34
+ # Saves the resource script to the given pathname.
35
+ #
36
+ # @param [Pathname] pathname
37
+ # The path where the embed frameworks script should be saved.
38
+ #
39
+ # @return [void]
40
+ #
41
+ def save_as(pathname)
42
+ pathname.open('w') do |file|
43
+ file.puts(script)
44
+ end
45
+ File.chmod(0o755, pathname.to_s)
46
+ end
47
+
48
+ # @return [String] The contents of the embed frameworks script.
49
+ #
50
+ def generate
51
+ script
52
+ end
53
+
54
+ private
55
+
56
+ # @!group Private Helpers
57
+
58
+ # @return [String] The contents of the prepare artifacts script.
59
+ #
60
+ def script
61
+ script = <<-SH.strip_heredoc
62
+ #!/bin/sh
63
+ set -e
64
+ set -u
65
+ set -o pipefail
66
+
67
+ function on_error {
68
+ echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
69
+ }
70
+ trap 'on_error $LINENO' ERR
71
+
72
+ if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
73
+ # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
74
+ # frameworks to, so exit 0 (signalling the script phase was successful).
75
+ exit 0
76
+ fi
77
+
78
+ # This protects against multiple targets copying the same framework dependency at the same time. The solution
79
+ # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
80
+ RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
81
+
82
+ ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt"
83
+ cat > $ARTIFACT_LIST_FILE
84
+
85
+ BCSYMBOLMAP_DIR="BCSymbolMaps"
86
+
87
+ record_artifact()
88
+ {
89
+ echo "$1" >> $ARTIFACT_LIST_FILE
90
+ }
91
+
92
+ install_artifact()
93
+ {
94
+ local source="$1"
95
+ local destination="$2"
96
+ local record=${3:-false}
97
+
98
+ # Use filter instead of exclude so missing patterns don't throw errors.
99
+ echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" \\"${source}\\" \\"${destination}\\""
100
+ rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}" "${destination}"
101
+
102
+ if [[ "$record" == "true" ]]; then
103
+ artifact="${destination}/$(basename "$source")"
104
+ record_artifact "$artifact"
105
+ fi
106
+ }
107
+
108
+ # Copies a framework to derived data for use in later build phases
109
+ install_framework()
110
+ {
111
+ if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
112
+ local source="${BUILT_PRODUCTS_DIR}/$1"
113
+ elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
114
+ local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
115
+ elif [ -r "$1" ]; then
116
+ local source="$1"
117
+ fi
118
+
119
+ local record_artifact=${2:-true}
120
+ local destination="${TARGET_BUILD_DIR}"
121
+
122
+ if [ -L "${source}" ]; then
123
+ echo "Symlinked..."
124
+ source="$(readlink "${source}")"
125
+ fi
126
+
127
+ install_artifact "$source" "$destination" "$record_artifact"
128
+
129
+ if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then
130
+ # Locate and install any .bcsymbolmaps if present
131
+ find "${source}/${BCSYMBOLMAP_DIR}/" -name "*.bcsymbolmap"|while read f; do
132
+ install_artifact "$f" "$destination" "true"
133
+ done
134
+ fi
135
+ }
136
+
137
+ install_xcframework() {
138
+ local basepath="$1"
139
+ local embed="$2"
140
+ shift
141
+ local paths=("$@")
142
+
143
+ # Locate the correct slice of the .xcframework for the current architectures
144
+ local target_path=""
145
+ local target_arch="$ARCHS"
146
+ local target_variant=""
147
+ if [[ "$PLATFORM_NAME" == *"simulator" ]]; then
148
+ target_variant="simulator"
149
+ fi
150
+ if [[ "$EFFECTIVE_PLATFORM_NAME" == *"maccatalyst" ]]; then
151
+ target_variant="maccatalyst"
152
+ fi
153
+ for i in ${!paths[@]}; do
154
+ if [[ "${paths[$i]}" == *"$target_arch"* ]] && [[ "${paths[$i]}" == *"$target_variant"* ]]; then
155
+ # Found a matching slice
156
+ echo "Selected xcframework slice ${paths[$i]}"
157
+ target_path=${paths[$i]}
158
+ break;
159
+ fi
160
+ done
161
+
162
+ if [[ -z "$target_path" ]]; then
163
+ echo "warning: [CP] Unable to find matching .xcframework slice in '${paths[@]}' for the current build architectures ($ARCHS)."
164
+ return
165
+ fi
166
+
167
+ install_framework "$basepath/$target_path" "$embed"
168
+ }
169
+
170
+ SH
171
+ contents_by_config = Hash.new do |hash, key|
172
+ hash[key] = ''
173
+ end
174
+ xcframeworks_by_config.each do |config, xcframeworks|
175
+ next if xcframeworks.empty?
176
+ xcframeworks.each do |xcframework|
177
+ slices = xcframework.slices.select { |f| f.platform.symbolic_name == platform.symbolic_name }
178
+ dynamic_slices, static_slices = slices.partition { |slice| Xcode::LinkageAnalyzer.dynamic_binary?(slice.binary_path) }
179
+ next if dynamic_slices.empty? && static_slices.empty?
180
+ unless dynamic_slices.empty?
181
+ args = install_xcframework_args(xcframework.path, dynamic_slices, false)
182
+ contents_by_config[config] << %( install_xcframework #{args}\n)
183
+ end
184
+
185
+ unless static_slices.empty?
186
+ args = install_xcframework_args(xcframework.path, static_slices, true)
187
+ contents_by_config[config] << %( install_xcframework #{args}\n)
188
+ end
189
+
190
+ dsyms = PrepareArtifactsScript.dsym_paths(xcframework.path)
191
+ dsyms.each do |path|
192
+ source = shell_escape("${PODS_ROOT}/#{path.relative_path_from(sandbox_root)}")
193
+ contents_by_config[config] << %( install_artifact #{source} "${TARGET_BUILD_DIR}" "true"\n)
194
+ end
195
+ end
196
+ end
197
+
198
+ script << "\n" unless contents_by_config.empty?
199
+ contents_by_config.keys.sort.each do |config|
200
+ contents = contents_by_config[config]
201
+ next if contents.empty?
202
+ script << %(if [[ "$CONFIGURATION" == "#{config}" ]]; then\n)
203
+ script << contents
204
+ script << "fi\n"
205
+ end
206
+
207
+ script << "\necho \"Artifact list stored at $ARTIFACT_LIST_FILE\"\n"
208
+ script << "\ncat \"$ARTIFACT_LIST_FILE\"\n"
209
+ script
210
+ end
211
+
212
+ def shell_escape(value)
213
+ "\"#{value}\""
214
+ end
215
+
216
+ def install_xcframework_args(root, slices, static)
217
+ args = [shell_escape("${PODS_ROOT}/#{root.relative_path_from(sandbox_root)}")]
218
+ embed = static ? 'false' : 'true'
219
+ args << shell_escape(embed)
220
+ slices.each do |slice|
221
+ args << shell_escape(slice.path.relative_path_from(root))
222
+ end
223
+ args.join(' ')
224
+ end
225
+
226
+ class << self
227
+ # @param [Pathname] xcframework_path
228
+ # the base path of the .xcframework bundle
229
+ #
230
+ # @return [Array<Pathname>] all found .dSYM paths
231
+ #
232
+ def dsym_paths(xcframework_path)
233
+ basename = File.basename(xcframework_path, '.xcframework')
234
+ dsym_basename = basename + '.dSYMs'
235
+ path = xcframework_path.dirname + dsym_basename
236
+ return [] unless File.directory?(path)
237
+
238
+ pattern = path + '*.dSYM'
239
+ Dir.glob(pattern).map { |s| Pathname.new(s) }
240
+ end
241
+ end
242
+ end
243
+ end
244
+ end
@@ -161,6 +161,7 @@ module Pod
161
161
  else
162
162
  integrate
163
163
  end
164
+ write_lockfiles
164
165
  perform_post_install_actions
165
166
  end
166
167
 
@@ -194,7 +195,7 @@ module Pod
194
195
 
195
196
  force_clean_install = clean_install || project_cache_version.version != Version.create(VersionMetadata.project_cache_version)
196
197
  cache_result = ProjectCache::ProjectCacheAnalyzer.new(sandbox, installation_cache, analysis_result.all_user_build_configurations,
197
- object_version, pod_targets, aggregate_targets, :clean_install => force_clean_install).analyze
198
+ object_version, plugins, pod_targets, aggregate_targets, :clean_install => force_clean_install).analyze
198
199
  aggregate_targets_to_generate = cache_result.aggregate_targets_to_generate || []
199
200
  pod_targets_to_generate = cache_result.pod_targets_to_generate
200
201
  (aggregate_targets_to_generate + pod_targets_to_generate).each do |target|
@@ -296,7 +297,6 @@ module Pod
296
297
  SandboxDirCleaner.new(sandbox, pod_targets, aggregate_targets).clean!
297
298
 
298
299
  update_project_cache(cache_analysis_result, target_installation_results)
299
- write_lockfiles
300
300
  end
301
301
 
302
302
  def create_and_save_projects(pod_targets_to_generate, aggregate_targets_to_generate, build_configurations, project_object_version)
@@ -319,11 +319,11 @@ module Pod
319
319
  predictabilize_uuids(generated_projects) if installation_options.deterministic_uuids?
320
320
  stabilize_target_uuids(generated_projects)
321
321
 
322
- run_podfile_post_install_hooks
323
-
324
322
  projects_writer = Xcode::PodsProjectWriter.new(sandbox, generated_projects,
325
323
  target_installation_results.pod_target_installation_results, installation_options)
326
- projects_writer.write!
324
+ projects_writer.write! do
325
+ run_podfile_post_install_hooks
326
+ end
327
327
 
328
328
  pods_project_pod_targets = pod_targets_to_generate - projects_by_pod_targets.values.flatten
329
329
  all_projects_by_pod_targets = {}
@@ -775,6 +775,7 @@ module Pod
775
775
  installation_cache.update_cache_key_by_target_label!(cache_analysis_result.cache_key_by_target_label)
776
776
  installation_cache.update_project_object_version!(cache_analysis_result.project_object_version)
777
777
  installation_cache.update_build_configurations!(cache_analysis_result.build_configurations)
778
+ installation_cache.update_podfile_plugins!(plugins)
778
779
  installation_cache.save_as(sandbox.project_installation_cache_path)
779
780
 
780
781
  metadata_cache.update_metadata!(target_installation_results.pod_target_installation_results || {},