Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 010c736

Browse files
committed
Don't iterate twice on the same collection in Podfile
1 parent f664a6b commit 010c736

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

Podfile

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,22 @@ abstract_target 'CI' do
5656
end
5757

5858
post_install do |installer|
59-
# Let Pods targets inherit deployment target from the app
60-
# This solution is suggested here: https://github.com/CocoaPods/CocoaPods/issues/4859
61-
# =====================================
62-
#
6359
installer.pods_project.targets.each do |target|
6460
target.build_configurations.each do |configuration|
61+
# Let Pods targets inherit deployment target from the app
62+
# This solution is suggested here: https://github.com/CocoaPods/CocoaPods/issues/4859
6563
pod_ios_deployment_target = Gem::Version.new(configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
6664
configuration.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' if pod_ios_deployment_target <= ios_deployment_target
67-
end
6865

69-
# This addresses Xcode 12, 13, and 14 showing an "Update to recommended
70-
# settings" warning on the Pods project.
71-
#
72-
# See:
73-
#
74-
# - https://github.com/CocoaPods/CocoaPods/issues/10189
75-
# - https://github.com/CocoaPods/CocoaPods/issues/11553
76-
installer.pods_project.targets.each do |target|
77-
target.build_configurations.each do |config|
78-
config.build_settings.delete 'ARCHS'
79-
config.build_settings['DEAD_CODE_STRIPPING'] = 'YES'
80-
end
66+
# This addresses Xcode 12, 13, and 14 showing an "Update to recommended
67+
# settings" warning on the Pods project.
68+
#
69+
# See:
70+
#
71+
# - https://github.com/CocoaPods/CocoaPods/issues/10189
72+
# - https://github.com/CocoaPods/CocoaPods/issues/11553
73+
configuration.build_settings.delete 'ARCHS'
74+
configuration.build_settings['DEAD_CODE_STRIPPING'] = 'YES'
8175
end
8276
end
8377
end

Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,6 @@ SPEC CHECKSUMS:
100100
WordPressUI: 1cf47a3b78154faf69caa18569ee7ece1e510fa0
101101
wpxmlrpc: bf55a43a7e710bd2a4fb8c02dfe83b1246f14f13
102102

103-
PODFILE CHECKSUM: 69f8d0d704408e64e07c6c2c94ca8b770590882e
103+
PODFILE CHECKSUM: 2a653425c540da12b5282d121d365e64faf8de4a
104104

105105
COCOAPODS: 1.11.3

0 commit comments

Comments
 (0)