FirebaseFirestore.podspec 4.0 KB

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