FirebasePerformance.podspec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. Pod::Spec.new do |s|
  2. s.name = 'FirebasePerformance'
  3. s.version = '12.6.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-2.0', :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 = '15.0'
  17. tvos_deployment_target = '15.0'
  18. s.swift_version = '5.9'
  19. s.ios.deployment_target = ios_deployment_target
  20. s.tvos.deployment_target = tvos_deployment_target
  21. s.cocoapods_version = '>= 1.12.0'
  22. s.prefix_header_file = false
  23. base_dir = "FirebasePerformance/"
  24. s.source_files = [
  25. base_dir + 'Sources/**/*.[cmh]',
  26. 'FirebaseCore/Extension/*.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/FirebasePerformance/*.h'
  35. preprocessor_definitions = 'FIRPerformance_LIB_VERSION=' + String(s.version)
  36. preprocessor_definitions += ' PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1'
  37. if ENV['FPR_UNSWIZZLE_AVAILABLE'] && ENV['FPR_UNSWIZZLE_AVAILABLE'] == '1' then
  38. preprocessor_definitions += ' UNSWIZZLE_AVAILABLE=1'
  39. end
  40. s.pod_target_xcconfig = {
  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', '~> 12.6.0'
  49. s.dependency 'FirebaseInstallations', '~> 12.6.0'
  50. s.dependency 'FirebaseRemoteConfig', '~> 12.6.0'
  51. s.dependency 'FirebaseSessions', '~> 12.6.0'
  52. s.dependency 'GoogleDataTransport', '~> 10.1'
  53. s.dependency 'GoogleUtilities/Environment', '~> 8.1'
  54. s.dependency 'GoogleUtilities/MethodSwizzler', '~> 8.1'
  55. s.dependency 'GoogleUtilities/UserDefaults', '~> 8.1'
  56. s.dependency 'nanopb', '~> 3.30910.0'
  57. s.test_spec 'unit' do |unit_tests|
  58. unit_tests.platforms = {:ios => ios_deployment_target, :tvos => tvos_deployment_target}
  59. unit_tests.scheme = { :code_coverage => true }
  60. unit_tests.source_files = [
  61. 'FirebasePerformance/Tests/Unit/**/*.{m,h,plist}',
  62. 'SharedTestUtilities/*.[hm]',
  63. ]
  64. unit_tests.resources = ['FirebasePerformance/Tests/Unit/Server/*File']
  65. unit_tests.requires_arc = true
  66. unit_tests.requires_app_host = true
  67. unit_tests.pod_target_xcconfig = {
  68. 'CLANG_ENABLE_OBJC_WEAK' => 'YES',
  69. }
  70. unit_tests.info_plist = {
  71. 'FPRTestingDummyFeature' => true,
  72. 'FPRScreenTracesForContainerVC' => true,
  73. 'FPRDelegateSwizzling' => true,
  74. 'FPRNSURLConnection' => true,
  75. 'FPRScreenTracesSwizzling' => true,
  76. 'FPRScreenTraces' => false,
  77. }
  78. unit_tests.dependency 'GoogleUtilities/SwizzlerTestHelpers'
  79. unit_tests.dependency 'OCMock'
  80. unit_tests.dependency 'GCDWebServer'
  81. end
  82. s.app_spec 'TestApp' do |app_spec|
  83. app_spec.platforms = {:ios => ios_deployment_target, :tvos => tvos_deployment_target}
  84. app_spec.source_files = ['FirebasePerformance/Tests/TestApp/Source/**/*.{m,h}']
  85. ios_resources = ['FirebasePerformance/Tests/TestApp/Resources/*.*']
  86. if ENV['FPR_AUTOPUSH_ENV'] && ENV['FPR_AUTOPUSH_ENV'] == '1' then
  87. ios_resources += ['FirebasePerformance/Tests/TestApp/Plists/Autopush/**/*.plist']
  88. app_spec.info_plist = {
  89. 'CFBundleIdentifier' => 'com.google.FIRPerfTestAppAutopush'
  90. }
  91. app_spec.scheme = {
  92. :environment_variables => { "FPR_AUTOPUSH_ENV" => "1" }
  93. }
  94. else
  95. ios_resources += ['FirebasePerformance/Tests/TestApp/Plists/Prod/**/*.plist']
  96. app_spec.info_plist = {
  97. 'CFBundleIdentifier' => 'com.google.FIRPerfTestApp'
  98. }
  99. end
  100. app_spec.ios.resources = ios_resources
  101. app_spec.requires_arc = true
  102. end
  103. end