FirebaseFirestore.podspec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. Pod::Spec.new do |s|
  2. s.name = 'FirebaseFirestore'
  3. s.version = '1.3.1'
  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/**/*',
  23. 'Firestore/Protos/nanopb/**/*.{h,cc}',
  24. 'Firestore/Protos/objc/**/*.[hm]',
  25. 'Firestore/core/include/**/*.{h,cc,mm}',
  26. 'Firestore/core/src/**/*.{h,cc,mm}',
  27. 'Firestore/third_party/Immutable/*.[mh]',
  28. ]
  29. s.requires_arc = [
  30. 'Firestore/Source/**/*',
  31. 'Firestore/core/src/**/*.mm',
  32. 'Firestore/third_party/Immutable/*.[mh]'
  33. ]
  34. s.exclude_files = [
  35. 'Firestore/third_party/Immutable/Tests/**',
  36. # Exclude alternate implementations for other platforms
  37. 'Firestore/core/src/firebase/firestore/api/input_validation_std.cc',
  38. 'Firestore/core/src/firebase/firestore/remote/connectivity_monitor_noop.cc',
  39. 'Firestore/core/src/firebase/firestore/remote/grpc_root_certificate_finder_generated.cc',
  40. 'Firestore/core/src/firebase/firestore/util/filesystem_win.cc',
  41. 'Firestore/core/src/firebase/firestore/util/hard_assert_stdio.cc',
  42. 'Firestore/core/src/firebase/firestore/util/log_stdio.cc',
  43. 'Firestore/core/src/firebase/firestore/util/secure_random_openssl.cc'
  44. ]
  45. s.public_header_files = 'Firestore/Source/Public/*.h'
  46. s.dependency 'FirebaseAuthInterop', '~> 1.0'
  47. s.dependency 'FirebaseCore', '~> 6.0'
  48. s.dependency 'gRPC-C++', '0.0.8'
  49. s.dependency 'leveldb-library', '~> 1.20'
  50. s.dependency 'Protobuf', '~> 3.1'
  51. s.dependency 'nanopb', '~> 0.3.901'
  52. s.ios.frameworks = 'MobileCoreServices', 'SystemConfiguration'
  53. s.osx.frameworks = 'SystemConfiguration'
  54. s.tvos.frameworks = 'SystemConfiguration'
  55. s.library = 'c++'
  56. s.pod_target_xcconfig = {
  57. 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++0x',
  58. 'GCC_C_LANGUAGE_STANDARD' => 'c99',
  59. 'GCC_PREPROCESSOR_DEFINITIONS' =>
  60. "FIRFirestore_VERSION=#{s.version} " +
  61. 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' +
  62. # The nanopb pod sets these defs, so we must too. (We *do* require 16bit
  63. # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT
  64. # anyways.)
  65. 'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1',
  66. 'HEADER_SEARCH_PATHS' =>
  67. '"${PODS_TARGET_SRCROOT}" ' +
  68. '"${PODS_TARGET_SRCROOT}/Firestore/third_party/abseil-cpp" ' +
  69. '"${PODS_ROOT}/nanopb" ' +
  70. '"${PODS_TARGET_SRCROOT}/Firestore/Protos/nanopb"',
  71. }
  72. # Generate a version of the config.h header suitable for building with
  73. # CocoaPods.
  74. s.prepare_command = <<-CMD
  75. sed '/^#cmakedefine/ d' \
  76. Firestore/core/src/firebase/firestore/util/config.h.in > \
  77. Firestore/core/src/firebase/firestore/util/config.h
  78. CMD
  79. s.compiler_flags = '$(inherited) -Wreorder -Werror=reorder'
  80. s.subspec 'abseil-cpp' do |ss|
  81. ss.preserve_path = [
  82. 'Firestore/third_party/abseil-cpp/absl'
  83. ]
  84. ss.source_files = [
  85. 'Firestore/third_party/abseil-cpp/**/*.cc'
  86. ]
  87. ss.exclude_files = [
  88. # Exclude tests and benchmarks from the framework.
  89. 'Firestore/third_party/abseil-cpp/**/*_benchmark.cc',
  90. 'Firestore/third_party/abseil-cpp/**/*test*.cc',
  91. 'Firestore/third_party/abseil-cpp/absl/hash/internal/print_hash_of.cc',
  92. # Exclude CMake-related everything, including tests
  93. 'Firestore/third_party/abseil-cpp/CMake/**/*.cc',
  94. # Avoid the debugging package which uses code that isn't portable to
  95. # ARM (see stack_consumption.cc) and uses syscalls not available on
  96. # tvOS (e.g. sigaltstack).
  97. 'Firestore/third_party/abseil-cpp/absl/debugging/**/*.cc',
  98. # Dropping the debugging package prevents downstream usage of this in the
  99. # abseil sources.
  100. 'Firestore/third_party/abseil-cpp/absl/container/internal/hashtable_debug*',
  101. 'Firestore/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler*',
  102. # Exclude the synchronization package because it's dead weight: we don't
  103. # write the kind of heavily threaded code that might benefit from it.
  104. 'Firestore/third_party/abseil-cpp/absl/synchronization/**/*.cc',
  105. ]
  106. ss.library = 'c++'
  107. ss.compiler_flags = '$(inherited) ' +
  108. '-Wno-comma ' +
  109. '-Wno-range-loop-analysis ' +
  110. '-Wno-shorten-64-to-32'
  111. end
  112. end