GoogleDataTransportCCTSupport.podspec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. Pod::Spec.new do |s|
  2. s.name = 'GoogleDataTransportCCTSupport'
  3. s.version = '2.0.2'
  4. s.summary = 'Support library for the GoogleDataTransport CCT backend target.'
  5. s.description = <<-DESC
  6. Support library to provide event prioritization and uploading for the GoogleDataTransport CCT backend target.
  7. DESC
  8. s.homepage = 'https://developers.google.com/'
  9. s.license = { :type => 'Apache', :file => 'LICENSE' }
  10. s.authors = 'Google, Inc.'
  11. s.source = {
  12. :git => 'https://github.com/firebase/firebase-ios-sdk.git',
  13. :tag => 'DataTransportCCTSupport-' + s.version.to_s
  14. }
  15. s.ios.deployment_target = '8.0'
  16. s.osx.deployment_target = '10.11'
  17. s.tvos.deployment_target = '10.0'
  18. s.watchos.deployment_target = '6.0'
  19. # To develop or run the tests, >= 1.8.0.beta.1 must be installed.
  20. s.cocoapods_version = '>= 1.4.0'
  21. s.static_framework = true
  22. s.prefix_header_file = false
  23. s.source_files = 'GoogleDataTransportCCTSupport/GDTCCTLibrary/**/*'
  24. s.private_header_files = 'GoogleDataTransportCCTSupport/GDTCCTLibrary/Private/*.h'
  25. s.ios.frameworks = 'SystemConfiguration', 'CoreTelephony'
  26. s.osx.frameworks = 'SystemConfiguration', 'CoreTelephony'
  27. s.tvos.frameworks = 'SystemConfiguration'
  28. s.libraries = ['z']
  29. s.dependency 'GoogleDataTransport', '~> 5.1'
  30. s.dependency 'nanopb', '~> 0.3.901'
  31. header_search_paths = {
  32. 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/GoogleDataTransportCCTSupport/"'
  33. }
  34. s.pod_target_xcconfig = {
  35. 'GCC_C_LANGUAGE_STANDARD' => 'c99',
  36. 'GCC_TREAT_WARNINGS_AS_ERRORS' => 'YES',
  37. 'CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY' => 'YES',
  38. 'GCC_PREPROCESSOR_DEFINITIONS' =>
  39. # The nanopb pod sets these defs, so we must too. (We *do* require 16bit
  40. # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT
  41. # anyways.)
  42. 'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1 GDTCCTSUPPORT_VERSION=' + s.version.to_s,
  43. }.merge(header_search_paths)
  44. # Test app specs
  45. if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
  46. s.app_spec 'TestApp' do |app_spec|
  47. app_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
  48. app_spec.source_files = 'GoogleDataTransportCCTSupport/GDTCCTTestApp/**/*.swift'
  49. app_spec.ios.resources = ['GoogleDataTransportCCTSupport/GDTCCTTestApp/ios/*.storyboard']
  50. app_spec.macos.resources = ['GoogleDataTransportCCTSupport/GDTCCTTestApp/macos/*.storyboard']
  51. app_spec.tvos.resources = ['GoogleDataTransportCCTSupport/GDTCCTTestApp/tvos/*.storyboard']
  52. app_spec.dependency 'SwiftProtobuf'
  53. app_spec.info_plist = {
  54. 'UILaunchStoryboardName' => 'Main',
  55. 'UIMainStoryboardFile' => 'Main',
  56. 'NSMainStoryboardFile' => 'Main'
  57. }
  58. end
  59. end
  60. # Test specs
  61. s.test_spec 'Tests-Unit' do |test_spec|
  62. test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
  63. test_spec.requires_app_host = false
  64. test_spec.source_files = 'GoogleDataTransportCCTSupport/GDTCCTTests/Unit/**/*.{h,m}'
  65. test_spec.resources = ['GoogleDataTransportCCTSupport/GDTCCTTests/Data/**/*']
  66. test_spec.pod_target_xcconfig = header_search_paths
  67. test_spec.dependency 'GCDWebServer'
  68. end
  69. s.test_spec 'Tests-Integration' do |test_spec|
  70. test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
  71. test_spec.requires_app_host = false
  72. test_spec.source_files = 'GoogleDataTransportCCTSupport/GDTCCTTests/Integration/**/*.{h,m}'
  73. test_spec.resources = ['GoogleDataTransportCCTSupport/GDTCCTTests/Data/**/*']
  74. test_spec.pod_target_xcconfig = header_search_paths
  75. end
  76. # Monkey test specs, only enabled for development.
  77. if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
  78. s.test_spec 'Tests-Monkey' do |test_spec|
  79. test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
  80. test_spec.requires_app_host = true
  81. test_spec.app_host_name = 'GoogleDataTransportCCTSupport/TestApp'
  82. test_spec.dependency 'GoogleDataTransportCCTSupport/TestApp'
  83. test_spec.source_files = ['GoogleDataTransportCCTSupport/GDTCCTTests/Monkey/**/*.{swift}']
  84. test_spec.info_plist = {
  85. 'GDT_MONKEYTEST' => '1'
  86. }
  87. end
  88. end
  89. end