FirebasePerformance.podspec 4.0 KB

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