Skip to content

Commit b7f7ebc

Browse files
committed
Add cocoapods support (broken)
1 parent 65931e7 commit b7f7ebc

File tree

2 files changed

+76
-1
lines changed

2 files changed

+76
-1
lines changed

FirebaseFirestore.podspec

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,30 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
2424
s.cocoapods_version = '>= 1.12.0'
2525
s.prefix_header_file = false
2626

27-
s.public_header_files = 'FirebaseFirestoreInternal/**/*.h'
27+
s.public_header_files = [
28+
'FirebaseFirestoreInternal/**/*.h',
29+
'Firestore/Swift/Source/SwiftAPI/*.swift',
30+
]
2831

2932
s.requires_arc = true
3033
s.source_files = [
3134
'FirebaseFirestoreInternal/**/*.[mh]',
3235
'Firestore/Swift/Source/**/*.swift',
3336
]
37+
38+
s.pod_target_xcconfig = {
39+
# Enables C++ <-> Swift interop (by default it's only C)
40+
"SWIFT_OBJC_INTEROP_MODE" => "objcxx",
41+
}
42+
3443
s.resource_bundles = {
3544
"#{s.module_name}_Privacy" => 'Firestore/Swift/Source/Resources/PrivacyInfo.xcprivacy'
3645
}
3746

3847
s.dependency 'FirebaseCore', '11.5'
3948
s.dependency 'FirebaseCoreExtension', '11.5'
4049
s.dependency 'FirebaseFirestoreInternal', '11.5.0'
50+
s.dependency 'FirebaseFirestoreCpp', '11.5.0'
4151
s.dependency 'FirebaseSharedSwift', '~> 11.0'
4252

4353
end

FirebaseFirestoreCpp.podspec

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
Pod::Spec.new do |s|
2+
s.name = 'FirebaseFirestoreCpp'
3+
s.version = '11.5.0'
4+
s.summary = 'Google Cloud Firestore'
5+
6+
s.description = <<-DESC
7+
Google Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development.
8+
DESC
9+
10+
s.homepage = 'https://developers.google.com/'
11+
s.license = { :type => 'Apache-2.0', :file => 'Firestore/LICENSE' }
12+
s.authors = 'Google, Inc.'
13+
14+
s.source = {
15+
:git => 'https://github.com/firebase/firebase-ios-sdk.git',
16+
:tag => 'CocoaPods-' + s.version.to_s
17+
}
18+
19+
s.ios.deployment_target = '13.0'
20+
s.osx.deployment_target = '10.15'
21+
s.tvos.deployment_target = '13.0'
22+
23+
s.swift_version = '5.9'
24+
25+
s.cocoapods_version = '>= 1.12.0'
26+
s.prefix_header_file = false
27+
28+
s.public_header_files = 'Firestore/core/swift/umbrella/*.h'
29+
30+
s.source_files = [
31+
'Firestore/core/swift/**/*.{cc,h}'
32+
]
33+
34+
abseil_version = '~> 1.20240116.1'
35+
s.dependency 'abseil/algorithm', abseil_version
36+
s.dependency 'abseil/base', abseil_version
37+
s.dependency 'abseil/container/flat_hash_map', abseil_version
38+
s.dependency 'abseil/memory', abseil_version
39+
s.dependency 'abseil/meta', abseil_version
40+
s.dependency 'abseil/strings/strings', abseil_version
41+
s.dependency 'abseil/time', abseil_version
42+
s.dependency 'abseil/types', abseil_version
43+
44+
s.ios.frameworks = 'SystemConfiguration', 'UIKit'
45+
s.osx.frameworks = 'SystemConfiguration'
46+
s.tvos.frameworks = 'SystemConfiguration', 'UIKit'
47+
48+
s.library = 'c++'
49+
s.pod_target_xcconfig = {
50+
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14',
51+
'CLANG_CXX_LIBRARY' => 'libc++',
52+
'GCC_C_LANGUAGE_STANDARD' => 'c99',
53+
'GCC_PREPROCESSOR_DEFINITIONS' =>
54+
"FIRFirestore_VERSION=#{s.version} " +
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 PB_ENABLE_MALLOC=1',
59+
'HEADER_SEARCH_PATHS' =>
60+
'"${PODS_TARGET_SRCROOT}" ' +
61+
'"${PODS_TARGET_SRCROOT}/Firestore/core/swift/include" '
62+
}
63+
64+
s.compiler_flags = '$(inherited) -Wreorder -Werror=reorder -Wno-comma'
65+
end

0 commit comments

Comments
 (0)