FirebaseFirestore.podspec 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. Pod::Spec.new do |s|
  2. s.name = 'FirebaseFirestore'
  3. s.version = '1.7.0'
  4. s.summary = 'Google Cloud Firestore for iOS'
  5. s.description = <<-DESC
  6. Google Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development.
  7. DESC
  8. s.homepage = 'https://developers.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 => 'Firestore-' + s.version.to_s
  14. }
  15. s.ios.deployment_target = '8.0'
  16. s.osx.deployment_target = '10.11'
  17. s.tvos.deployment_target = '10.0'
  18. s.cocoapods_version = '>= 1.4.0'
  19. s.static_framework = true
  20. s.prefix_header_file = false
  21. s.source_files = [
  22. 'Firestore/Source/Public/*.h',
  23. 'Firestore/Source/**/*.{m,mm}',
  24. 'Firestore/Protos/nanopb/**/*.cc',
  25. 'Firestore/Protos/objc/**/*.m',
  26. 'Firestore/core/include/**/*.{cc,mm}',
  27. 'Firestore/core/src/**/*.{cc,mm}',
  28. ]
  29. s.preserve_paths = [
  30. 'Firestore/Source/API/*.h',
  31. 'Firestore/Source/Core/*.h',
  32. 'Firestore/Source/Local/*.h',
  33. 'Firestore/Source/Remote/*.h',
  34. 'Firestore/Source/Util/*.h',
  35. 'Firestore/Protos/nanopb/**/*.h',
  36. 'Firestore/Protos/objc/**/*.h',
  37. 'Firestore/core/include/**/*.h',
  38. 'Firestore/core/src/**/*.h',
  39. ]
  40. s.requires_arc = [
  41. 'Firestore/Source/**/*',
  42. 'Firestore/core/src/**/*.mm',
  43. ]
  44. s.exclude_files = [
  45. # Exclude alternate implementations for other platforms
  46. 'Firestore/core/src/firebase/firestore/api/input_validation_std.cc',
  47. 'Firestore/core/src/firebase/firestore/remote/connectivity_monitor_noop.cc',
  48. 'Firestore/core/src/firebase/firestore/remote/grpc_root_certificate_finder_generated.cc',
  49. 'Firestore/core/src/firebase/firestore/util/filesystem_win.cc',
  50. 'Firestore/core/src/firebase/firestore/util/hard_assert_stdio.cc',
  51. 'Firestore/core/src/firebase/firestore/util/log_stdio.cc',
  52. 'Firestore/core/src/firebase/firestore/util/secure_random_openssl.cc'
  53. ]
  54. s.public_header_files = 'Firestore/Source/Public/*.h'
  55. s.dependency 'FirebaseAuthInterop', '~> 1.0'
  56. s.dependency 'FirebaseCore', '~> 6.2'
  57. s.dependency 'gRPC-C++', '0.0.9'
  58. s.dependency 'leveldb-library', '~> 1.22'
  59. s.dependency 'Protobuf', '~> 3.9', '>= 3.9.2'
  60. s.dependency 'nanopb', '~> 0.3.901'
  61. s.ios.frameworks = 'MobileCoreServices', 'SystemConfiguration'
  62. s.osx.frameworks = 'SystemConfiguration'
  63. s.tvos.frameworks = 'SystemConfiguration'
  64. s.library = 'c++'
  65. s.pod_target_xcconfig = {
  66. 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++0x',
  67. 'GCC_C_LANGUAGE_STANDARD' => 'c99',
  68. 'GCC_PREPROCESSOR_DEFINITIONS' =>
  69. "FIRFirestore_VERSION=#{s.version} " +
  70. 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' +
  71. # The nanopb pod sets these defs, so we must too. (We *do* require 16bit
  72. # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT
  73. # anyways.)
  74. 'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1',
  75. 'HEADER_SEARCH_PATHS' =>
  76. '"${PODS_TARGET_SRCROOT}" ' +
  77. '"${PODS_TARGET_SRCROOT}/Firestore/Source/Public" ' +
  78. '"${PODS_TARGET_SRCROOT}/Firestore/third_party/abseil-cpp" ' +
  79. '"${PODS_ROOT}/nanopb" ' +
  80. '"${PODS_TARGET_SRCROOT}/Firestore/Protos/nanopb" ' +
  81. '"${PODS_TARGET_SRCROOT}/Firestore/Protos/objc/google/api" ' +
  82. '"${PODS_TARGET_SRCROOT}/Firestore/Protos/objc/google/firestore/v1" ' +
  83. '"${PODS_TARGET_SRCROOT}/Firestore/Protos/objc/google/rpc" ' +
  84. '"${PODS_TARGET_SRCROOT}/Firestore/Protos/objc/google/type"',
  85. }
  86. # Generate a version of the config.h header suitable for building with
  87. # CocoaPods.
  88. s.prepare_command = <<-CMD
  89. sed '/^#cmakedefine/ d' \
  90. Firestore/core/src/firebase/firestore/util/config.h.in > \
  91. Firestore/core/src/firebase/firestore/util/config.h
  92. CMD
  93. s.compiler_flags = '$(inherited) -Wreorder -Werror=reorder'
  94. s.subspec 'abseil-cpp' do |ss|
  95. ss.preserve_path = [
  96. 'Firestore/third_party/abseil-cpp/absl'
  97. ]
  98. ss.source_files = [
  99. 'Firestore/third_party/abseil-cpp/**/*.cc'
  100. ]
  101. ss.exclude_files = [
  102. # Exclude tests and benchmarks from the framework.
  103. 'Firestore/third_party/abseil-cpp/**/*_benchmark.cc',
  104. 'Firestore/third_party/abseil-cpp/**/*test*.cc',
  105. 'Firestore/third_party/abseil-cpp/absl/hash/internal/print_hash_of.cc',
  106. # Exclude CMake-related everything, including tests
  107. 'Firestore/third_party/abseil-cpp/CMake/**/*.cc',
  108. # Avoid the debugging package which uses code that isn't portable to
  109. # ARM (see stack_consumption.cc) and uses syscalls not available on
  110. # tvOS (e.g. sigaltstack).
  111. 'Firestore/third_party/abseil-cpp/absl/debugging/**/*.cc',
  112. # Dropping the debugging package prevents downstream usage of this in the
  113. # abseil sources.
  114. 'Firestore/third_party/abseil-cpp/absl/container/internal/hashtable_debug*',
  115. 'Firestore/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler*',
  116. # Exclude the synchronization package because it's dead weight: we don't
  117. # write the kind of heavily threaded code that might benefit from it.
  118. 'Firestore/third_party/abseil-cpp/absl/synchronization/**/*.cc',
  119. ]
  120. ss.library = 'c++'
  121. ss.compiler_flags = '$(inherited) ' +
  122. '-Wno-comma ' +
  123. '-Wno-range-loop-analysis ' +
  124. '-Wno-shorten-64-to-32'
  125. end
  126. end