Podfile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. use_frameworks!
  2. def all_example_pods
  3. pod 'SDWebImage/MapKit', :path => './'
  4. pod 'SDWebImageWebPCoder', :git => 'https://github.com/SDWebImage/SDWebImageWebPCoder.git', :branch => 'master'
  5. end
  6. def watch_example_pods
  7. pod 'SDWebImage/Core', :path => './'
  8. pod 'SDWebImageWebPCoder', :git => 'https://github.com/SDWebImage/SDWebImageWebPCoder.git', :branch => 'master'
  9. end
  10. def vision_example_pods
  11. pod 'SDWebImage/MapKit', :path => './'
  12. pod 'SDWebImageSwiftUI', :git => 'https://github.com/SDWebImage/SDWebImageSwiftUI.git', :branch => 'master'
  13. end
  14. def all_test_pods
  15. pod 'SDWebImage/MapKit', :path => './'
  16. # These two Pods seems no longer maintained...
  17. pod 'Expecta', :podspec => 'Tests/Expecta.podspec'
  18. pod 'KVOController', :podspec => 'Tests/KVOController.podspec'
  19. end
  20. example_project_path = 'Examples/SDWebImage Demo'
  21. test_project_path = 'Tests/SDWebImage Tests'
  22. workspace 'SDWebImage.xcworkspace'
  23. # Example Project
  24. target 'SDWebImage iOS Demo' do
  25. project example_project_path
  26. platform :ios, '9.0'
  27. all_example_pods
  28. end
  29. target 'SDWebImage OSX Demo' do
  30. project example_project_path
  31. platform :osx, '10.11'
  32. all_example_pods
  33. end
  34. target 'SDWebImage TV Demo' do
  35. project example_project_path
  36. platform :tvos, '9.0'
  37. all_example_pods
  38. end
  39. target 'SDWebImage Watch Demo Extension' do
  40. project example_project_path
  41. platform :watchos, '2.0'
  42. watch_example_pods
  43. end
  44. target 'SDWebImage Vision Demo' do
  45. project example_project_path
  46. platform :visionos, '1.0'
  47. vision_example_pods
  48. end
  49. # Test Project
  50. target 'Tests iOS' do
  51. project test_project_path
  52. platform :ios, '9.0'
  53. all_test_pods
  54. end
  55. target 'Tests Mac' do
  56. project test_project_path
  57. platform :osx, '10.11'
  58. all_test_pods
  59. end
  60. target 'Tests TV' do
  61. project test_project_path
  62. platform :tvos, '9.0'
  63. all_test_pods
  64. end
  65. target 'Tests Vision' do
  66. project test_project_path
  67. platform :visionos, '1.0'
  68. all_test_pods
  69. end
  70. # Inject macro during SDWebImage Demo and Tests
  71. post_install do |installer_representation|
  72. installer_representation.pods_project.targets.each do |target|
  73. if target.product_name == 'SDWebImage'
  74. target.build_configurations.each do |config|
  75. config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) SD_CHECK_CGIMAGE_RETAIN_SOURCE=1'
  76. end
  77. else
  78. target.build_configurations.each do |config|
  79. # Override the min deployment target for some test specs to workaround `libarclite.a` missing issue
  80. config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
  81. config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.11'
  82. config.build_settings['TVOS_DEPLOYMENT_TARGET'] = '9.0'
  83. config.build_settings['WATCHOS_DEPLOYMENT_TARGET'] = '2.0'
  84. config.build_settings['XROS_DEPLOYMENT_TARGET'] = '1.0'
  85. end
  86. end
  87. end
  88. end