🐛 :: Explicitly set deployment target for GradientLoadingBar in Pods project, as this will be read by Carthage

This commit is contained in:
Felix Mau
2022-09-13 19:49:15 +02:00
parent 0cfdc7d269
commit df453eeb5a
4 changed files with 23 additions and 29 deletions
+21 -13
View File
@@ -25,8 +25,27 @@ target 'Example' do
end
post_install do |installer|
# Fix issues with interface builder and cocoapods.
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if target.name == 'GradientLoadingBar'
# Explicitly set the iOS deployment target for `GradientLoadingBar` in our pods project, as this will be read by Carthage.
#
# - Note: This value has to match `s.ios.deployment_target` from the `.podspec` file!!
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
else
# Remove the deployment target from all other pods in our project and let them inherit
# the project/workspace deployment target that has been specified at the top of the Podfile.
# Source: https://stackoverflow.com/a/63489366
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
#
# Fix issues with interface builder and CocoaPods.
#
# Source: https://github.com/CocoaPods/CocoaPods/issues/7606#issuecomment-484294739
#
installer.pods_project.build_configurations.each do |config|
next unless config.name == 'Debug'
@@ -34,16 +53,5 @@ target 'Example' do
'$(FRAMEWORK_SEARCH_PATHS)'
]
end
# Fix warning "The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,
# but the range of supported deployment target versions is 11.0 to 16.0.99."
#
# Source: https://stackoverflow.com/a/58367269
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
end
end