FirebaseFirestore.podspec 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. Pod::Spec.new do |s|
  2. s.name = 'FirebaseFirestore'
  3. s.version = '0.13.2'
  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/Port/**/*',
  22. 'Firestore/Protos/nanopb/**/*.[hc]',
  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/Port/*test.cc',
  35. 'Firestore/third_party/Immutable/Tests/**',
  36. # Exclude alternate implementations for other platforms
  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. s.dependency 'FirebaseAuthInterop', '~> 1.0'
  44. s.dependency 'FirebaseCore', '~> 5.0'
  45. s.dependency 'gRPC-ProtoRPC', '~> 1.0'
  46. s.dependency 'leveldb-library', '~> 1.18'
  47. s.dependency 'Protobuf', '~> 3.1'
  48. s.dependency 'nanopb', '~> 0.3.8'
  49. s.frameworks = 'MobileCoreServices'
  50. s.library = 'c++'
  51. s.pod_target_xcconfig = {
  52. 'GCC_PREPROCESSOR_DEFINITIONS' =>
  53. "FIRFirestore_VERSION=#{s.version} " +
  54. 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' +
  55. # The nanopb pod sets these defs, so we must too. (We *do* require 16bit
  56. # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT
  57. # anyways.)
  58. 'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1',
  59. 'HEADER_SEARCH_PATHS' =>
  60. '"${PODS_TARGET_SRCROOT}" ' +
  61. '"${PODS_TARGET_SRCROOT}/Firestore/third_party/abseil-cpp" ' +
  62. '"${PODS_ROOT}/nanopb" ' +
  63. '"${PODS_TARGET_SRCROOT}/Firestore/Protos/nanopb"',
  64. }
  65. # Generate a version of the config.h header suitable for building with
  66. # CocoaPods.
  67. s.prepare_command = <<-CMD
  68. sed '/^#cmakedefine/ d' \
  69. Firestore/core/src/firebase/firestore/util/config.h.in > \
  70. Firestore/core/src/firebase/firestore/util/config.h
  71. CMD
  72. s.subspec 'abseil-cpp' do |ss|
  73. ss.preserve_path = [
  74. 'Firestore/third_party/abseil-cpp/absl'
  75. ]
  76. ss.source_files = [
  77. 'Firestore/third_party/abseil-cpp/**/*.cc'
  78. ]
  79. ss.exclude_files = [
  80. 'Firestore/third_party/abseil-cpp/**/*_test.cc',
  81. ]
  82. ss.library = 'c++'
  83. ss.compiler_flags = '$(inherited) ' + '-Wno-comma -Wno-range-loop-analysis'
  84. end
  85. end