FirebasePerformance.podspec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. Pod::Spec.new do |s|
  2. s.name = 'FirebasePerformance'
  3. s.version = '10.11.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 = '11.0'
  17. tvos_deployment_target = '12.0'
  18. s.swift_version = '5.3'
  19. s.ios.deployment_target = ios_deployment_target
  20. s.tvos.deployment_target = tvos_deployment_target
  21. s.cocoapods_version = '>= 1.4.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_C_LANGUAGE_STANDARD' => 'c99',
  42. 'GCC_PREPROCESSOR_DEFINITIONS' => preprocessor_definitions,
  43. # Unit tests do library imports using repo-root relative paths.
  44. 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"',
  45. }
  46. s.ios.framework = 'CoreTelephony'
  47. s.framework = 'QuartzCore'
  48. s.framework = 'SystemConfiguration'
  49. s.dependency 'FirebaseCore', '~> 10.5'
  50. s.dependency 'FirebaseInstallations', '~> 10.0'
  51. s.dependency 'FirebaseRemoteConfig', '~> 10.0'
  52. s.dependency 'FirebaseSessions', '~> 10.5'
  53. s.dependency 'GoogleDataTransport', '~> 9.2'
  54. s.dependency 'GoogleUtilities/Environment', '~> 7.8'
  55. s.dependency 'GoogleUtilities/ISASwizzler', '~> 7.8'
  56. s.dependency 'GoogleUtilities/MethodSwizzler', '~> 7.8'
  57. s.dependency 'nanopb', '>= 2.30908.0', '< 2.30910.0'
  58. s.test_spec 'unit' do |unit_tests|
  59. unit_tests.platforms = {:ios => ios_deployment_target, :tvos => tvos_deployment_target}
  60. unit_tests.scheme = { :code_coverage => true }
  61. unit_tests.source_files = [
  62. 'FirebasePerformance/Tests/Unit/**/*.{m,h,plist}',
  63. 'SharedTestUtilities/*.[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 => ios_deployment_target, :tvos => tvos_deployment_target}
  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