FirebasePerformance.podspec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. Pod::Spec.new do |s|
  2. s.name = 'FirebasePerformance'
  3. s.version = '7.3.0'
  4. s.summary = 'Firebase Performance'
  5. s.description = <<-DESC
  6. Firebase Performance library to measure performance of Mobile and Web Apps.
  7. DESC
  8. s.homepage = 'https://firebase.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 => 'CocoaPods-' + s.version.to_s
  14. }
  15. s.social_media_url = 'https://twitter.com/Firebase'
  16. s.ios.deployment_target = '10.0'
  17. s.cocoapods_version = '>= 1.4.0'
  18. s.static_framework = true
  19. s.prefix_header_file = false
  20. base_dir = "FirebasePerformance/"
  21. s.source_files = [
  22. base_dir + 'Sources/**/*.[mh]',
  23. base_dir + 'ProtoSupport/**/*.[mh]',
  24. 'FirebaseCore/Sources/Private/*.h',
  25. 'FirebaseInstallations/Source/Library/Private/*.h',
  26. 'FirebaseRemoteConfig/Sources/Private/*.h',
  27. 'GoogleDataTransport/GDTCORLibrary/Internal/*.h',
  28. 'GoogleUtilities/ISASwizzler/Private/*.h',
  29. 'GoogleUtilities/MethodSwizzler/Private/*.h',
  30. 'GoogleUtilities/Environment/Private/*.h',
  31. ]
  32. s.requires_arc = [
  33. base_dir + 'Sources/**/*.[mh]',
  34. base_dir + 'Public/**/*.h',
  35. ]
  36. s.public_header_files = base_dir + 'Sources/Public/*.h'
  37. preprocessor_definitions = 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' + 'FIRPerformance_LIB_VERSION=' + String(s.version)
  38. if ENV['FPR_UNSWIZZLE_AVAILABLE'] && ENV['FPR_UNSWIZZLE_AVAILABLE'] == '1' then
  39. preprocessor_definitions += ' UNSWIZZLE_AVAILABLE=1'
  40. end
  41. s.pod_target_xcconfig = {
  42. 'GCC_C_LANGUAGE_STANDARD' => 'c99',
  43. 'GCC_PREPROCESSOR_DEFINITIONS' => preprocessor_definitions,
  44. # Unit tests do library imports using repo-root relative paths.
  45. 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"',
  46. }
  47. s.ios.framework = 'CoreTelephony'
  48. s.ios.framework = 'QuartzCore'
  49. s.ios.framework = 'SystemConfiguration'
  50. s.dependency 'FirebaseCore', '~> 7.0'
  51. s.dependency 'FirebaseInstallations', '~> 7.0'
  52. s.dependency 'FirebaseRemoteConfig', '~> 7.0'
  53. s.dependency 'GoogleDataTransport', '~> 8.2'
  54. s.dependency 'GoogleUtilities/Environment', '~> 7.0'
  55. s.dependency 'GoogleUtilities/ISASwizzler', '~> 7.0'
  56. s.dependency 'GoogleUtilities/MethodSwizzler', '~> 7.0'
  57. s.dependency 'Protobuf', '~> 3.12'
  58. s.test_spec 'unit' do |unit_tests|
  59. unit_tests.scheme = { :code_coverage => true }
  60. unit_tests.platforms = {:ios => '10.0'}
  61. unit_tests.source_files = [
  62. 'FirebasePerformance/Tests/Unit/**/*.{m,h,plist}',
  63. 'GoogleDataTransport/GDTCORTests/Common/**/*.[hm]',
  64. ]
  65. unit_tests.resources = ['FirebasePerformance/Tests/Unit/Server/*File']
  66. unit_tests.requires_arc = true
  67. unit_tests.requires_app_host = true
  68. unit_tests.pod_target_xcconfig = {
  69. 'CLANG_ENABLE_OBJC_WEAK' => 'YES',
  70. }
  71. unit_tests.info_plist = {
  72. 'FPRTestingDummyFeature' => true,
  73. 'FPRScreenTracesForContainerVC' => true,
  74. 'FPRDelegateSwizzling' => true,
  75. 'FPRNSURLConnection' => true,
  76. 'FPRScreenTracesSwizzling' => true,
  77. 'FPRScreenTraces' => false,
  78. }
  79. unit_tests.dependency 'GoogleUtilities/SwizzlerTestHelpers'
  80. unit_tests.dependency 'OCMock'
  81. unit_tests.dependency 'GCDWebServer'
  82. end
  83. s.app_spec 'TestApp' do |app_spec|
  84. app_spec.platforms = {:ios => '10.0'}
  85. app_spec.source_files = ['FirebasePerformance/Tests/TestApp/Source/**/*.{m,h}']
  86. ios_resources = ['FirebasePerformance/Tests/TestApp/Resources/*.*']
  87. if ENV['FPR_AUTOPUSH_ENV'] && ENV['FPR_AUTOPUSH_ENV'] == '1' then
  88. ios_resources += ['FirebasePerformance/Tests/TestApp/Plists/Autopush/**/*.plist']
  89. app_spec.info_plist = {
  90. 'CFBundleIdentifier' => 'com.google.FIRPerfTestAppAutopush'
  91. }
  92. app_spec.scheme = {
  93. :environment_variables => { "FPR_AUTOPUSH_ENV" => "1" }
  94. }
  95. else
  96. ios_resources += ['FirebasePerformance/Tests/TestApp/Plists/Prod/**/*.plist']
  97. app_spec.info_plist = {
  98. 'CFBundleIdentifier' => 'com.google.FIRPerfTestApp'
  99. }
  100. end
  101. app_spec.ios.resources = ios_resources
  102. app_spec.requires_arc = true
  103. end
  104. end