FirebasePerformance.podspec 4.1 KB

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