From 24c18bf4030fcbab56869066d7ccf5d935026ebd Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sat, 9 Mar 2024 23:06:29 +0800 Subject: [PATCH] Workaround the 32bit target on Xcode 15.2 --- Podfile | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Podfile b/Podfile index 3bfde54..e7e7ce4 100644 --- a/Podfile +++ b/Podfile @@ -59,4 +59,27 @@ target 'SDWebImageSwiftUITests tvOS' do project test_project_path platform :tvos, '14.0' all_test_pods -end \ No newline at end of file +end + + +# Inject macro during SDWebImage Demo and Tests +post_install do |installer_representation| + installer_representation.pods_project.targets.each do |target| + if target.product_name == 'SDWebImage' + target.build_configurations.each do |config| + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) SD_CHECK_CGIMAGE_RETAIN_SOURCE=1' + end + elsif target.product_name == 'SDWebImageSwiftUI' + # Do nothing + else + target.build_configurations.each do |config| + # Override the min deployment target for some test specs to workaround `libarclite.a` missing issue + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0' + config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.11' + config.build_settings['TVOS_DEPLOYMENT_TARGET'] = '9.0' + config.build_settings['WATCHOS_DEPLOYMENT_TARGET'] = '2.0' + config.build_settings['XROS_DEPLOYMENT_TARGET'] = '1.0' + end + end + end +end