FirebaseFirestore.podspec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. Pod::Spec.new do |s|
  2. s.name = 'FirebaseFirestore'
  3. s.version = '0.16.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.10'
  17. s.cocoapods_version = '>= 1.4.0'
  18. s.static_framework = true
  19. s.prefix_header_file = false
  20. s.source_files = [
  21. 'Firestore/Source/**/*',
  22. 'Firestore/Protos/nanopb/**/*.{h,cc}',
  23. 'Firestore/Protos/objc/**/*.[hm]',
  24. 'Firestore/core/include/**/*.{h,cc,mm}',
  25. 'Firestore/core/src/**/*.{h,cc,mm}',
  26. 'Firestore/third_party/Immutable/*.[mh]',
  27. ]
  28. s.requires_arc = [
  29. 'Firestore/Source/**/*',
  30. 'Firestore/core/src/**/*.mm',
  31. 'Firestore/third_party/Immutable/*.[mh]'
  32. ]
  33. s.exclude_files = [
  34. 'Firestore/third_party/Immutable/Tests/**',
  35. # Exclude alternate implementations for other platforms
  36. 'Firestore/core/src/firebase/firestore/remote/connectivity_monitor_noop.cc',
  37. 'Firestore/core/src/firebase/firestore/remote/grpc_root_certificate_finder_generated.cc',
  38. 'Firestore/core/src/firebase/firestore/util/filesystem_win.cc',
  39. 'Firestore/core/src/firebase/firestore/util/hard_assert_stdio.cc',
  40. 'Firestore/core/src/firebase/firestore/util/log_stdio.cc',
  41. 'Firestore/core/src/firebase/firestore/util/secure_random_openssl.cc'
  42. ]
  43. s.public_header_files = 'Firestore/Source/Public/*.h'
  44. s.dependency 'FirebaseAuthInterop', '~> 1.0'
  45. s.dependency 'FirebaseCore', '~> 5.2'
  46. s.dependency 'gRPC-C++', '0.0.6'
  47. s.dependency 'leveldb-library', '~> 1.20'
  48. s.dependency 'Protobuf', '~> 3.1'
  49. s.dependency 'nanopb', '~> 0.3.901'
  50. s.ios.frameworks = 'MobileCoreServices', 'SystemConfiguration'
  51. s.osx.frameworks = 'SystemConfiguration'
  52. s.library = 'c++'
  53. s.pod_target_xcconfig = {
  54. 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++0x',
  55. 'GCC_C_LANGUAGE_STANDARD' => 'c99',
  56. 'GCC_PREPROCESSOR_DEFINITIONS' =>
  57. "FIRFirestore_VERSION=#{s.version} " +
  58. 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' +
  59. # The nanopb pod sets these defs, so we must too. (We *do* require 16bit
  60. # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT
  61. # anyways.)
  62. 'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1',
  63. 'HEADER_SEARCH_PATHS' =>
  64. '"${PODS_TARGET_SRCROOT}" ' +
  65. '"${PODS_TARGET_SRCROOT}/Firestore/third_party/abseil-cpp" ' +
  66. '"${PODS_ROOT}/nanopb" ' +
  67. '"${PODS_TARGET_SRCROOT}/Firestore/Protos/nanopb"',
  68. }
  69. # Generate a version of the config.h header suitable for building with
  70. # CocoaPods.
  71. s.prepare_command = <<-CMD
  72. sed '/^#cmakedefine/ d' \
  73. Firestore/core/src/firebase/firestore/util/config.h.in > \
  74. Firestore/core/src/firebase/firestore/util/config.h
  75. CMD
  76. s.compiler_flags = '$(inherited) -Wreorder -Werror=reorder'
  77. s.subspec 'abseil-cpp' do |ss|
  78. ss.preserve_path = [
  79. 'Firestore/third_party/abseil-cpp/absl'
  80. ]
  81. ss.source_files = [
  82. 'Firestore/third_party/abseil-cpp/**/*.cc'
  83. ]
  84. ss.exclude_files = [
  85. 'Firestore/third_party/abseil-cpp/**/*_benchmark.cc',
  86. 'Firestore/third_party/abseil-cpp/**/*test*.cc',
  87. 'Firestore/third_party/abseil-cpp/absl/hash/internal/print_hash_of.cc',
  88. 'Firestore/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.cc',
  89. ]
  90. ss.library = 'c++'
  91. ss.compiler_flags = '$(inherited) ' +
  92. '-Wno-comma ' +
  93. '-Wno-range-loop-analysis ' +
  94. '-Wno-shorten-64-to-32'
  95. end
  96. end