Podfile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 all_test_pods
  11. pod 'SDWebImage/MapKit', :path => './'
  12. pod 'Expecta'
  13. pod 'KVOController'
  14. pod 'SDWebImageWebPCoder', :git => 'https://github.com/SDWebImage/SDWebImageWebPCoder.git', :branch => 'master'
  15. end
  16. example_project_path = 'Examples/SDWebImage Demo'
  17. test_project_path = 'Tests/SDWebImage Tests'
  18. workspace 'SDWebImage.xcworkspace'
  19. # Example Project
  20. target 'SDWebImage iOS Demo' do
  21. project example_project_path
  22. platform :ios, '9.0'
  23. all_example_pods
  24. end
  25. target 'SDWebImage OSX Demo' do
  26. project example_project_path
  27. platform :osx, '10.11'
  28. all_example_pods
  29. end
  30. target 'SDWebImage TV Demo' do
  31. project example_project_path
  32. platform :tvos, '9.0'
  33. all_example_pods
  34. end
  35. target 'SDWebImage Watch Demo Extension' do
  36. project example_project_path
  37. platform :watchos, '2.0'
  38. watch_example_pods
  39. end
  40. # Test Project
  41. target 'Tests iOS' do
  42. project test_project_path
  43. platform :ios, '9.0'
  44. all_test_pods
  45. end
  46. target 'Tests Mac' do
  47. project test_project_path
  48. platform :osx, '10.11'
  49. all_test_pods
  50. end
  51. target 'Tests TV' do
  52. project test_project_path
  53. platform :tvos, '9.0'
  54. all_test_pods
  55. end
  56. # Inject macro during SDWebImage Demo and Tests
  57. post_install do |installer_representation|
  58. installer_representation.generated_pod_targets.each do |target|
  59. if target.pod_name == "SDWebImage"
  60. build_settings = target.build_settings
  61. build_settings.each do |configuration, build_setting|
  62. if configuration == :debug
  63. config = build_setting.xcconfig
  64. old_value = config.attributes['GCC_PREPROCESSOR_DEFINITIONS']
  65. config.attributes['GCC_PREPROCESSOR_DEFINITIONS'] = old_value + ' SD_CHECK_CGIMAGE_RETAIN_SOURCE=1'
  66. config.save_as(target.xcconfig_path(configuration))
  67. end
  68. end
  69. end
  70. end
  71. end