From 163cbddea7192c3eedb94b35f1a694e929000868 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Tue, 22 Oct 2024 22:19:15 -0400 Subject: [PATCH 01/30] init --- .../Swift/Source/SwiftAPI/SwiftCppAPI.swift | 14 +++++++++ Firestore/core/CMakeLists.txt | 3 ++ Firestore/core/swift/include/used_by_swift.h | 15 +++++++++ Firestore/core/swift/src/used_by_swift.cc | 10 ++++++ .../swift/umbrella/FirebaseFirestoreCpp.h | 10 ++++++ Package.swift | 31 +++++++++++++++++-- 6 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift create mode 100644 Firestore/core/swift/include/used_by_swift.h create mode 100644 Firestore/core/swift/src/used_by_swift.cc create mode 100644 Firestore/core/swift/umbrella/FirebaseFirestoreCpp.h diff --git a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift new file mode 100644 index 00000000000..159f2bcdd46 --- /dev/null +++ b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift @@ -0,0 +1,14 @@ +// +// SwiftCppAPI.swift +// Firebase +// +// Created by Cheryl Lin on 2024-10-22. +// + +import FirebaseFirestoreCpp + +public class SwiftCppWrapper { + init(_ value : String ){ + _ = UsedBySwift(std.string(value)) + } +} diff --git a/Firestore/core/CMakeLists.txt b/Firestore/core/CMakeLists.txt index 65238165549..79ce44ec4c5 100644 --- a/Firestore/core/CMakeLists.txt +++ b/Firestore/core/CMakeLists.txt @@ -218,6 +218,9 @@ firebase_ios_glob( src/objc/*.h src/remote/*.cc src/remote/*.h + swift/include/*.h + swift/src/*.cc + swift/umbrella/*.h EXCLUDE ${nanopb_sources} ) diff --git a/Firestore/core/swift/include/used_by_swift.h b/Firestore/core/swift/include/used_by_swift.h new file mode 100644 index 00000000000..d06b8effbe4 --- /dev/null +++ b/Firestore/core/swift/include/used_by_swift.h @@ -0,0 +1,15 @@ +// +// Created by Cheryl Lin on 2024-10-22. +// + +#ifndef FIREBASE_USED_BY_SWIFT_H +#define FIREBASE_USED_BY_SWIFT_H + +#include + +class UsedBySwift { + public: + explicit UsedBySwift(std::string content); +}; + +#endif // FIREBASE_USED_BY_SWIFT_H diff --git a/Firestore/core/swift/src/used_by_swift.cc b/Firestore/core/swift/src/used_by_swift.cc new file mode 100644 index 00000000000..b6cc5ee11c4 --- /dev/null +++ b/Firestore/core/swift/src/used_by_swift.cc @@ -0,0 +1,10 @@ +// +// Created by Cheryl Lin on 2024-10-22. +// + +#include "Firestore/core/swift/include/used_by_swift.h" +#include + +UsedBySwift::UsedBySwift(std::string content) { + std::cout << "ctor runs with value: " << content << std::endl; +} diff --git a/Firestore/core/swift/umbrella/FirebaseFirestoreCpp.h b/Firestore/core/swift/umbrella/FirebaseFirestoreCpp.h new file mode 100644 index 00000000000..7ea07015a0d --- /dev/null +++ b/Firestore/core/swift/umbrella/FirebaseFirestoreCpp.h @@ -0,0 +1,10 @@ +// +// Created by Cheryl Lin on 2024-10-22. +// + +#ifndef FIREBASE_FIREBASEFIRESTORECPP_H +#define FIREBASE_FIREBASEFIRESTORECPP_H + +#import "../include/used_by_swift.h" + +#endif // FIREBASE_FIREBASEFIRESTORECPP_H diff --git a/Package.swift b/Package.swift index f7c9ac2c9e0..e3c0f42bb3a 100644 --- a/Package.swift +++ b/Package.swift @@ -477,7 +477,10 @@ let package = Package( dependencies: [ "FirebaseFirestoreTarget", ], - path: "FirebaseCombineSwift/Sources/Firestore" + path: "FirebaseCombineSwift/Sources/Firestore", + swiftSettings: [ + .interoperabilityMode(.Cxx), // C++ interoperability setting + ] ), .target( name: "FirebaseStorageCombineSwift", @@ -1392,6 +1395,20 @@ func firestoreWrapperTarget() -> Target { ) } +func firebaseFirestoreCppTarget() -> Target { + return .target( + name: "FirebaseFirestoreCpp", + path: "Firestore/core/swift", + sources: [ + "src", + ], + publicHeadersPath: "include", // Path to the public headers + cxxSettings: [ + .headerSearchPath("umbrella"), // Ensure the header search path is correct + ] + ) +} + func firestoreTargets() -> [Target] { if ProcessInfo.processInfo.environment["FIREBASE_SOURCE_FIRESTORE"] != nil { return [ @@ -1462,6 +1479,7 @@ func firestoreTargets() -> [Target] { .linkedLibrary("c++"), ] ), + firebaseFirestoreCppTarget(), .target( name: "FirebaseFirestore", dependencies: [ @@ -1469,6 +1487,7 @@ func firestoreTargets() -> [Target] { "FirebaseCoreExtension", "FirebaseFirestoreInternalWrapper", "FirebaseSharedSwift", + "FirebaseFirestoreCpp", ], path: "Firestore", exclude: [ @@ -1489,7 +1508,10 @@ func firestoreTargets() -> [Target] { sources: [ "Swift/Source/", ], - resources: [.process("Source/Resources/PrivacyInfo.xcprivacy")] + resources: [.process("Source/Resources/PrivacyInfo.xcprivacy")], + swiftSettings: [ + .interoperabilityMode(.Cxx), // C++ interoperability setting + ] ), ] } @@ -1535,9 +1557,13 @@ func firestoreTargets() -> [Target] { "FirebaseCoreExtension", "leveldb", "FirebaseSharedSwift", + "FirebaseFirestoreCpp", ], path: "Firestore/Swift/Source", resources: [.process("Resources/PrivacyInfo.xcprivacy")], + swiftSettings: [ + .interoperabilityMode(.Cxx), // C++ interoperability setting + ], linkerSettings: [ .linkedFramework("SystemConfiguration", .when(platforms: [.iOS, .macOS, .tvOS])), .linkedFramework("UIKit", .when(platforms: [.iOS, .tvOS])), @@ -1554,5 +1580,6 @@ func firestoreTargets() -> [Target] { publicHeadersPath: "." ), firestoreInternalTarget, + firebaseFirestoreCppTarget(), ] } From 6350734b340d403699265cedf838d0c1fa5c1000 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Tue, 22 Oct 2024 22:56:41 -0400 Subject: [PATCH 02/30] bug fix --- Firestore/core/swift/src/used_by_swift.cc | 2 +- Package.swift | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Firestore/core/swift/src/used_by_swift.cc b/Firestore/core/swift/src/used_by_swift.cc index b6cc5ee11c4..c497d8ee1b1 100644 --- a/Firestore/core/swift/src/used_by_swift.cc +++ b/Firestore/core/swift/src/used_by_swift.cc @@ -2,7 +2,7 @@ // Created by Cheryl Lin on 2024-10-22. // -#include "Firestore/core/swift/include/used_by_swift.h" +#include "../include/used_by_swift.h" #include UsedBySwift::UsedBySwift(std::string content) { diff --git a/Package.swift b/Package.swift index e3c0f42bb3a..8601eeb7bfd 100644 --- a/Package.swift +++ b/Package.swift @@ -1175,7 +1175,10 @@ let package = Package( "FirebaseStorage", .product(name: "nanopb", package: "nanopb"), ], - path: "SwiftPMTests/swift-test" + path: "SwiftPMTests/swift-test", + swiftSettings: [ + .interoperabilityMode(.Cxx), // C++ interoperability setting + ] ), .testTarget( name: "analytics-import-test", @@ -1399,9 +1402,6 @@ func firebaseFirestoreCppTarget() -> Target { return .target( name: "FirebaseFirestoreCpp", path: "Firestore/core/swift", - sources: [ - "src", - ], publicHeadersPath: "include", // Path to the public headers cxxSettings: [ .headerSearchPath("umbrella"), // Ensure the header search path is correct From 19cdc822ecafd4dc5df89c266746afc2198c468b Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Thu, 24 Oct 2024 14:07:56 -0400 Subject: [PATCH 03/30] add extern c --- .../Sources/Public/FirebaseCore/FIRVersion.h | 9 ++++++++ Package.swift | 22 +++++++++---------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/FirebaseCore/Sources/Public/FirebaseCore/FIRVersion.h b/FirebaseCore/Sources/Public/FirebaseCore/FIRVersion.h index 651edaf5c8b..65a3e764822 100644 --- a/FirebaseCore/Sources/Public/FirebaseCore/FIRVersion.h +++ b/FirebaseCore/Sources/Public/FirebaseCore/FIRVersion.h @@ -19,7 +19,16 @@ NS_ASSUME_NONNULL_BEGIN /** Returns the current version of Firebase. */ + +#ifdef __cplusplus +extern "C" { +#endif + NS_SWIFT_NAME(FirebaseVersion()) NSString* FIRFirebaseVersion(void); +#ifdef __cplusplus +} +#endif + NS_ASSUME_NONNULL_END diff --git a/Package.swift b/Package.swift index 8601eeb7bfd..41d4c9ccb37 100644 --- a/Package.swift +++ b/Package.swift @@ -479,7 +479,7 @@ let package = Package( ], path: "FirebaseCombineSwift/Sources/Firestore", swiftSettings: [ - .interoperabilityMode(.Cxx), // C++ interoperability setting + .interoperabilityMode(.Cxx), // C++ interoperability setting ] ), .target( @@ -1177,7 +1177,7 @@ let package = Package( ], path: "SwiftPMTests/swift-test", swiftSettings: [ - .interoperabilityMode(.Cxx), // C++ interoperability setting + .interoperabilityMode(.Cxx), // C++ interoperability setting ] ), .testTarget( @@ -1399,14 +1399,14 @@ func firestoreWrapperTarget() -> Target { } func firebaseFirestoreCppTarget() -> Target { - return .target( - name: "FirebaseFirestoreCpp", - path: "Firestore/core/swift", - publicHeadersPath: "include", // Path to the public headers - cxxSettings: [ - .headerSearchPath("umbrella"), // Ensure the header search path is correct - ] - ) + return .target( + name: "FirebaseFirestoreCpp", + path: "Firestore/core/swift", + publicHeadersPath: "include", // Path to the public headers + cxxSettings: [ + .headerSearchPath("umbrella"), // Ensure the header search path is correct + ] + ) } func firestoreTargets() -> [Target] { @@ -1562,7 +1562,7 @@ func firestoreTargets() -> [Target] { path: "Firestore/Swift/Source", resources: [.process("Resources/PrivacyInfo.xcprivacy")], swiftSettings: [ - .interoperabilityMode(.Cxx), // C++ interoperability setting + .interoperabilityMode(.Cxx), // C++ interoperability setting ], linkerSettings: [ .linkedFramework("SystemConfiguration", .when(platforms: [.iOS, .macOS, .tvOS])), From be5efcff93ffc4ceab07508e2cf4d2891ea14886 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Mon, 28 Oct 2024 14:23:14 -0400 Subject: [PATCH 04/30] public init --- Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift index 159f2bcdd46..debf38adc2e 100644 --- a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift +++ b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift @@ -8,7 +8,7 @@ import FirebaseFirestoreCpp public class SwiftCppWrapper { - init(_ value : String ){ + public init(_ value : String ){ _ = UsedBySwift(std.string(value)) } } From d89a70bea0b5dbb74a37bb512be2d378b32aadce Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Tue, 29 Oct 2024 13:33:15 -0400 Subject: [PATCH 05/30] Add cocoapods support (broken) --- FirebaseFirestore.podspec | 11 +++++- FirebaseFirestoreCpp.podspec | 65 ++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 FirebaseFirestoreCpp.podspec diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index 2399a185509..b46c67d874b 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -24,13 +24,22 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, s.cocoapods_version = '>= 1.12.0' s.prefix_header_file = false - s.public_header_files = 'FirebaseFirestoreInternal/**/*.h' + s.public_header_files = [ + 'FirebaseFirestoreInternal/**/*.h', + 'Firestore/Swift/Source/SwiftAPI/*.swift', + ] s.requires_arc = true s.source_files = [ 'FirebaseFirestoreInternal/**/*.[mh]', 'Firestore/Swift/Source/**/*.swift', ] + + s.pod_target_xcconfig = { + # Enables C++ <-> Swift interop (by default it's only C) + "SWIFT_OBJC_INTEROP_MODE" => "objcxx", + } + s.resource_bundles = { "#{s.module_name}_Privacy" => 'Firestore/Swift/Source/Resources/PrivacyInfo.xcprivacy' } diff --git a/FirebaseFirestoreCpp.podspec b/FirebaseFirestoreCpp.podspec new file mode 100644 index 00000000000..68bd2be887a --- /dev/null +++ b/FirebaseFirestoreCpp.podspec @@ -0,0 +1,65 @@ +Pod::Spec.new do |s| + s.name = 'FirebaseFirestoreCpp' + s.version = '11.5.0' + s.summary = 'Google Cloud Firestore' + + s.description = <<-DESC +Google Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. + DESC + + s.homepage = 'https://developers.google.com/' + s.license = { :type => 'Apache-2.0', :file => 'Firestore/LICENSE' } + s.authors = 'Google, Inc.' + + s.source = { + :git => 'https://github.com/firebase/firebase-ios-sdk.git', + :tag => 'CocoaPods-' + s.version.to_s + } + + s.ios.deployment_target = '13.0' + s.osx.deployment_target = '10.15' + s.tvos.deployment_target = '13.0' + + s.swift_version = '5.9' + + s.cocoapods_version = '>= 1.12.0' + s.prefix_header_file = false + + s.public_header_files = 'Firestore/core/swift/umbrella/*.h' + + s.source_files = [ + 'Firestore/core/swift/**/*.{cc,h}' + ] + + abseil_version = '~> 1.20240116.1' + s.dependency 'abseil/algorithm', abseil_version + s.dependency 'abseil/base', abseil_version + s.dependency 'abseil/container/flat_hash_map', abseil_version + s.dependency 'abseil/memory', abseil_version + s.dependency 'abseil/meta', abseil_version + s.dependency 'abseil/strings/strings', abseil_version + s.dependency 'abseil/time', abseil_version + s.dependency 'abseil/types', abseil_version + + s.ios.frameworks = 'SystemConfiguration', 'UIKit' + s.osx.frameworks = 'SystemConfiguration' + s.tvos.frameworks = 'SystemConfiguration', 'UIKit' + + s.library = 'c++' + s.pod_target_xcconfig = { + 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14', + 'CLANG_CXX_LIBRARY' => 'libc++', + 'GCC_C_LANGUAGE_STANDARD' => 'c99', + 'GCC_PREPROCESSOR_DEFINITIONS' => + "FIRFirestore_VERSION=#{s.version} " + + # The nanopb pod sets these defs, so we must too. (We *do* require 16bit + # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT + # anyways.) + 'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1', + 'HEADER_SEARCH_PATHS' => + '"${PODS_TARGET_SRCROOT}" ' + + '"${PODS_TARGET_SRCROOT}/Firestore/core/swift/include" ' + } + + s.compiler_flags = '$(inherited) -Wreorder -Werror=reorder -Wno-comma' +end From f2326f7eaa82e46e69194b517e595116fe3542db Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Tue, 29 Oct 2024 14:29:15 -0400 Subject: [PATCH 06/30] Remove swift file in public header --- FirebaseFirestore.podspec | 5 +---- FirebaseFirestoreCpp.podspec | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index b46c67d874b..cf3a3764071 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -24,10 +24,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, s.cocoapods_version = '>= 1.12.0' s.prefix_header_file = false - s.public_header_files = [ - 'FirebaseFirestoreInternal/**/*.h', - 'Firestore/Swift/Source/SwiftAPI/*.swift', - ] + s.public_header_files = 'FirebaseFirestoreInternal/**/*.h' s.requires_arc = true s.source_files = [ diff --git a/FirebaseFirestoreCpp.podspec b/FirebaseFirestoreCpp.podspec index 68bd2be887a..5127e077602 100644 --- a/FirebaseFirestoreCpp.podspec +++ b/FirebaseFirestoreCpp.podspec @@ -58,7 +58,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, 'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1', 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}" ' + - '"${PODS_TARGET_SRCROOT}/Firestore/core/swift/include" ' + '"${PODS_TARGET_SRCROOT}/Firestore/core/swift" ' } s.compiler_flags = '$(inherited) -Wreorder -Werror=reorder -Wno-comma' From a980df31fd9c7cffa5aa8b64f5e3e5af22c3592a Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Fri, 1 Nov 2024 16:01:54 -0400 Subject: [PATCH 07/30] Fix cocoapods --- FirebaseFirestoreCpp.podspec | 2 +- Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift | 4 ++-- .../core/swift/{umbrella => include}/FirebaseFirestoreCpp.h | 2 +- Package.swift | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename Firestore/core/swift/{umbrella => include}/FirebaseFirestoreCpp.h (82%) diff --git a/FirebaseFirestoreCpp.podspec b/FirebaseFirestoreCpp.podspec index 5127e077602..97fd1b5c9cd 100644 --- a/FirebaseFirestoreCpp.podspec +++ b/FirebaseFirestoreCpp.podspec @@ -25,7 +25,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, s.cocoapods_version = '>= 1.12.0' s.prefix_header_file = false - s.public_header_files = 'Firestore/core/swift/umbrella/*.h' + s.public_header_files = 'Firestore/core/swift/include/*.h' s.source_files = [ 'Firestore/core/swift/**/*.{cc,h}' diff --git a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift index debf38adc2e..1c83eb92de5 100644 --- a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift +++ b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift @@ -8,7 +8,7 @@ import FirebaseFirestoreCpp public class SwiftCppWrapper { - public init(_ value : String ){ + public init(_ value: String) { _ = UsedBySwift(std.string(value)) - } + } } diff --git a/Firestore/core/swift/umbrella/FirebaseFirestoreCpp.h b/Firestore/core/swift/include/FirebaseFirestoreCpp.h similarity index 82% rename from Firestore/core/swift/umbrella/FirebaseFirestoreCpp.h rename to Firestore/core/swift/include/FirebaseFirestoreCpp.h index 7ea07015a0d..029e364a6fc 100644 --- a/Firestore/core/swift/umbrella/FirebaseFirestoreCpp.h +++ b/Firestore/core/swift/include/FirebaseFirestoreCpp.h @@ -5,6 +5,6 @@ #ifndef FIREBASE_FIREBASEFIRESTORECPP_H #define FIREBASE_FIREBASEFIRESTORECPP_H -#import "../include/used_by_swift.h" +#import "used_by_swift.h" #endif // FIREBASE_FIREBASEFIRESTORECPP_H diff --git a/Package.swift b/Package.swift index 41d4c9ccb37..f7cdf77c9df 100644 --- a/Package.swift +++ b/Package.swift @@ -1404,7 +1404,7 @@ func firebaseFirestoreCppTarget() -> Target { path: "Firestore/core/swift", publicHeadersPath: "include", // Path to the public headers cxxSettings: [ - .headerSearchPath("umbrella"), // Ensure the header search path is correct + .headerSearchPath("include"), // Ensure the header search path is correct ] ) } From 2dfbe504a2643bf70e1dd6f48a5aac8bec738f3c Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Fri, 1 Nov 2024 16:06:39 -0400 Subject: [PATCH 08/30] Fix style --- .../Swift/Source/SwiftAPI/SwiftCppAPI.swift | 21 +++++++++++++------ Firestore/core/CMakeLists.txt | 1 - .../core/swift/include/FirebaseFirestoreCpp.h | 18 +++++++++++++--- Firestore/core/swift/include/used_by_swift.h | 18 +++++++++++++--- Firestore/core/swift/src/used_by_swift.cc | 18 +++++++++++++--- 5 files changed, 60 insertions(+), 16 deletions(-) diff --git a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift index 1c83eb92de5..4b2db92536c 100644 --- a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift +++ b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift @@ -1,9 +1,18 @@ -// -// SwiftCppAPI.swift -// Firebase -// -// Created by Cheryl Lin on 2024-10-22. -// +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import FirebaseFirestoreCpp diff --git a/Firestore/core/CMakeLists.txt b/Firestore/core/CMakeLists.txt index 79ce44ec4c5..4da90c896ee 100644 --- a/Firestore/core/CMakeLists.txt +++ b/Firestore/core/CMakeLists.txt @@ -220,7 +220,6 @@ firebase_ios_glob( src/remote/*.h swift/include/*.h swift/src/*.cc - swift/umbrella/*.h EXCLUDE ${nanopb_sources} ) diff --git a/Firestore/core/swift/include/FirebaseFirestoreCpp.h b/Firestore/core/swift/include/FirebaseFirestoreCpp.h index 029e364a6fc..dd769230b8f 100644 --- a/Firestore/core/swift/include/FirebaseFirestoreCpp.h +++ b/Firestore/core/swift/include/FirebaseFirestoreCpp.h @@ -1,6 +1,18 @@ -// -// Created by Cheryl Lin on 2024-10-22. -// +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #ifndef FIREBASE_FIREBASEFIRESTORECPP_H #define FIREBASE_FIREBASEFIRESTORECPP_H diff --git a/Firestore/core/swift/include/used_by_swift.h b/Firestore/core/swift/include/used_by_swift.h index d06b8effbe4..c5d5c516fc4 100644 --- a/Firestore/core/swift/include/used_by_swift.h +++ b/Firestore/core/swift/include/used_by_swift.h @@ -1,6 +1,18 @@ -// -// Created by Cheryl Lin on 2024-10-22. -// +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #ifndef FIREBASE_USED_BY_SWIFT_H #define FIREBASE_USED_BY_SWIFT_H diff --git a/Firestore/core/swift/src/used_by_swift.cc b/Firestore/core/swift/src/used_by_swift.cc index c497d8ee1b1..87981e2c4c7 100644 --- a/Firestore/core/swift/src/used_by_swift.cc +++ b/Firestore/core/swift/src/used_by_swift.cc @@ -1,6 +1,18 @@ -// -// Created by Cheryl Lin on 2024-10-22. -// +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #include "../include/used_by_swift.h" #include From 7887fe5e30e4b7d911e51a194ffa1b2ae5fff275 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Tue, 5 Nov 2024 12:26:40 -0500 Subject: [PATCH 09/30] simplify cocoapods --- FirebaseCombineSwift.podspec | 4 +- FirebaseFirestoreCpp.podspec | 65 ------------------- FirebaseFirestoreInternal.podspec | 6 +- .../Swift/Source/SwiftAPI/SwiftCppAPI.swift | 4 +- 4 files changed, 11 insertions(+), 68 deletions(-) delete mode 100644 FirebaseFirestoreCpp.podspec diff --git a/FirebaseCombineSwift.podspec b/FirebaseCombineSwift.podspec index cb3cedf4512..593164ad0e8 100644 --- a/FirebaseCombineSwift.podspec +++ b/FirebaseCombineSwift.podspec @@ -59,6 +59,7 @@ for internal testing only. It should not be published. s.pod_target_xcconfig = { 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"', + 'SWIFT_OBJC_INTEROP_MODE' => 'objcxx', } s.test_spec 'unit' do |unit_tests| @@ -81,7 +82,8 @@ for internal testing only. It should not be published. unit_tests.exclude_files = 'FirebaseCombineSwift/Tests/Unit/**/*Template.swift' unit_tests.requires_app_host = true unit_tests.pod_target_xcconfig = { - 'SWIFT_OBJC_BRIDGING_HEADER' => '$(PODS_TARGET_SRCROOT)/FirebaseCombineSwift/Tests/Unit/FirebaseCombine-unit-Bridging-Header.h' + 'SWIFT_OBJC_BRIDGING_HEADER' => '$(PODS_TARGET_SRCROOT)/FirebaseCombineSwift/Tests/Unit/FirebaseCombine-unit-Bridging-Header.h', + 'SWIFT_OBJC_INTEROP_MODE' => 'objcxx', } unit_tests.dependency 'OCMock' unit_tests.dependency 'FirebaseAuthTestingSupport' diff --git a/FirebaseFirestoreCpp.podspec b/FirebaseFirestoreCpp.podspec deleted file mode 100644 index 97fd1b5c9cd..00000000000 --- a/FirebaseFirestoreCpp.podspec +++ /dev/null @@ -1,65 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'FirebaseFirestoreCpp' - s.version = '11.5.0' - s.summary = 'Google Cloud Firestore' - - s.description = <<-DESC -Google Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. - DESC - - s.homepage = 'https://developers.google.com/' - s.license = { :type => 'Apache-2.0', :file => 'Firestore/LICENSE' } - s.authors = 'Google, Inc.' - - s.source = { - :git => 'https://github.com/firebase/firebase-ios-sdk.git', - :tag => 'CocoaPods-' + s.version.to_s - } - - s.ios.deployment_target = '13.0' - s.osx.deployment_target = '10.15' - s.tvos.deployment_target = '13.0' - - s.swift_version = '5.9' - - s.cocoapods_version = '>= 1.12.0' - s.prefix_header_file = false - - s.public_header_files = 'Firestore/core/swift/include/*.h' - - s.source_files = [ - 'Firestore/core/swift/**/*.{cc,h}' - ] - - abseil_version = '~> 1.20240116.1' - s.dependency 'abseil/algorithm', abseil_version - s.dependency 'abseil/base', abseil_version - s.dependency 'abseil/container/flat_hash_map', abseil_version - s.dependency 'abseil/memory', abseil_version - s.dependency 'abseil/meta', abseil_version - s.dependency 'abseil/strings/strings', abseil_version - s.dependency 'abseil/time', abseil_version - s.dependency 'abseil/types', abseil_version - - s.ios.frameworks = 'SystemConfiguration', 'UIKit' - s.osx.frameworks = 'SystemConfiguration' - s.tvos.frameworks = 'SystemConfiguration', 'UIKit' - - s.library = 'c++' - s.pod_target_xcconfig = { - 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14', - 'CLANG_CXX_LIBRARY' => 'libc++', - 'GCC_C_LANGUAGE_STANDARD' => 'c99', - 'GCC_PREPROCESSOR_DEFINITIONS' => - "FIRFirestore_VERSION=#{s.version} " + - # The nanopb pod sets these defs, so we must too. (We *do* require 16bit - # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT - # anyways.) - 'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1', - 'HEADER_SEARCH_PATHS' => - '"${PODS_TARGET_SRCROOT}" ' + - '"${PODS_TARGET_SRCROOT}/Firestore/core/swift" ' - } - - s.compiler_flags = '$(inherited) -Wreorder -Werror=reorder -Wno-comma' -end diff --git a/FirebaseFirestoreInternal.podspec b/FirebaseFirestoreInternal.podspec index 393e948c95e..bc19e2dc5d2 100644 --- a/FirebaseFirestoreInternal.podspec +++ b/FirebaseFirestoreInternal.podspec @@ -28,7 +28,10 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, # Header files that constitute the interface to this module. Only Objective-C # headers belong here, since FirebaseFirestore is primarily an Objective-C # framework. - s.public_header_files = 'Firestore/Source/Public/FirebaseFirestore/*.h' + s.public_header_files = [ + 'Firestore/Source/Public/FirebaseFirestore/*.h', + 'Firestore/core/swift/include/*.h' + ] # source_files contains most of the header and source files for the project. # This includes files named in `public_header_files`. @@ -52,6 +55,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, 'Firestore/core/include/**/*.{cc,mm}', 'Firestore/core/src/**/*.{cc,mm}', 'FirebaseAuth/Interop/**/*.h', + 'Firestore/core/swift/**/*.{cc,h}', ] # Internal headers that aren't necessarily globally unique. Most C++ internal diff --git a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift index 4b2db92536c..aaafb30ef3d 100644 --- a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift +++ b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift @@ -14,7 +14,9 @@ * limitations under the License. */ -import FirebaseFirestoreCpp +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreCpp +#endif // SWIFT_PACKAGE public class SwiftCppWrapper { public init(_ value: String) { From 2e504e52ba6020297583b70d2ec8564e515b5f47 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Tue, 5 Nov 2024 17:51:54 -0500 Subject: [PATCH 10/30] Add Objective-C version --- Firestore/Source/API/FIRInterface.mm | 36 +++++++++++++++++++ .../Public/FirebaseFirestore/FIRInterface.h | 29 +++++++++++++++ .../Swift/Source/SwiftAPI/SwiftCppAPI.swift | 4 +-- Firestore/core/src/api/used_by_objective_c.cc | 22 ++++++++++++ Firestore/core/src/api/used_by_objective_c.h | 27 ++++++++++++++ Firestore/core/swift/include/used_by_swift.h | 4 +-- Firestore/core/swift/src/used_by_swift.cc | 4 +-- 7 files changed, 120 insertions(+), 6 deletions(-) create mode 100644 Firestore/Source/API/FIRInterface.mm create mode 100644 Firestore/Source/Public/FirebaseFirestore/FIRInterface.h create mode 100644 Firestore/core/src/api/used_by_objective_c.cc create mode 100644 Firestore/core/src/api/used_by_objective_c.h diff --git a/Firestore/Source/API/FIRInterface.mm b/Firestore/Source/API/FIRInterface.mm new file mode 100644 index 00000000000..5dc0e5bac1c --- /dev/null +++ b/Firestore/Source/API/FIRInterface.mm @@ -0,0 +1,36 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "Firestore/Source/Public/FirebaseFirestore/FIRInterface.h" + +#import "Firestore/core/src/api/used_by_objective_c.h" +#include "Firestore/core/src/util/string_apple.h" + +using firebase::firestore::util::MakeString; + +NS_ASSUME_NONNULL_BEGIN + +@implementation FIRInterface + ++ (void)print:(NSString *)content { + CppInterfaceCalledByObjectiveC::print(MakeString(content)); +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Public/FirebaseFirestore/FIRInterface.h b/Firestore/Source/Public/FirebaseFirestore/FIRInterface.h new file mode 100644 index 00000000000..222b7024e91 --- /dev/null +++ b/Firestore/Source/Public/FirebaseFirestore/FIRInterface.h @@ -0,0 +1,29 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface FIRInterface : NSObject + +#pragma mark - Create Filter + ++ (void)print:(NSString *)content; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift index aaafb30ef3d..fafeec43e98 100644 --- a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift +++ b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift @@ -18,8 +18,8 @@ @_exported import FirebaseFirestoreCpp #endif // SWIFT_PACKAGE -public class SwiftCppWrapper { +public class SwiftCallingCpp { public init(_ value: String) { - _ = UsedBySwift(std.string(value)) + CppInterfaceCalledBySwift.print(std.string(value)) } } diff --git a/Firestore/core/src/api/used_by_objective_c.cc b/Firestore/core/src/api/used_by_objective_c.cc new file mode 100644 index 00000000000..1333cecfe1f --- /dev/null +++ b/Firestore/core/src/api/used_by_objective_c.cc @@ -0,0 +1,22 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "used_by_objective_c.h" +#include + +void CppInterfaceCalledByObjectiveC::print(std::string content) { + std::cout << "C++ function runs with value: " << content << std::endl; +} diff --git a/Firestore/core/src/api/used_by_objective_c.h b/Firestore/core/src/api/used_by_objective_c.h new file mode 100644 index 00000000000..06360f441ba --- /dev/null +++ b/Firestore/core/src/api/used_by_objective_c.h @@ -0,0 +1,27 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FIREBASE_USED_BY_SWIFT_H +#define FIREBASE_USED_BY_SWIFT_H + +#include + +class CppInterfaceCalledByObjectiveC { + public: + static void print(std::string content); +}; + +#endif // FIREBASE_USED_BY_SWIFT_H diff --git a/Firestore/core/swift/include/used_by_swift.h b/Firestore/core/swift/include/used_by_swift.h index c5d5c516fc4..e4016b3c6a7 100644 --- a/Firestore/core/swift/include/used_by_swift.h +++ b/Firestore/core/swift/include/used_by_swift.h @@ -19,9 +19,9 @@ #include -class UsedBySwift { +class CppInterfaceCalledBySwift { public: - explicit UsedBySwift(std::string content); + static void print(std::string content); }; #endif // FIREBASE_USED_BY_SWIFT_H diff --git a/Firestore/core/swift/src/used_by_swift.cc b/Firestore/core/swift/src/used_by_swift.cc index 87981e2c4c7..d5261294e62 100644 --- a/Firestore/core/swift/src/used_by_swift.cc +++ b/Firestore/core/swift/src/used_by_swift.cc @@ -17,6 +17,6 @@ #include "../include/used_by_swift.h" #include -UsedBySwift::UsedBySwift(std::string content) { - std::cout << "ctor runs with value: " << content << std::endl; +void CppInterfaceCalledBySwift::print(std::string content) { + std::cout << "C++ function runs with value: " << content << std::endl; } From 50e52e0cbdcaf652545f5700879870ab8c44eca4 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Mon, 11 Nov 2024 09:55:47 -0800 Subject: [PATCH 11/30] use @_implementationOnly --- Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift | 4 ++-- Package.swift | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift index fafeec43e98..8797915cc68 100644 --- a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift +++ b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift @@ -15,11 +15,11 @@ */ #if SWIFT_PACKAGE - @_exported import FirebaseFirestoreCpp + @_implementationOnly import FirebaseFirestoreCpp #endif // SWIFT_PACKAGE public class SwiftCallingCpp { - public init(_ value: String) { + public static func print(_ value: String) { CppInterfaceCalledBySwift.print(std.string(value)) } } diff --git a/Package.swift b/Package.swift index f7cdf77c9df..e9bb757db95 100644 --- a/Package.swift +++ b/Package.swift @@ -477,10 +477,7 @@ let package = Package( dependencies: [ "FirebaseFirestoreTarget", ], - path: "FirebaseCombineSwift/Sources/Firestore", - swiftSettings: [ - .interoperabilityMode(.Cxx), // C++ interoperability setting - ] + path: "FirebaseCombineSwift/Sources/Firestore" ), .target( name: "FirebaseStorageCombineSwift", @@ -1175,10 +1172,7 @@ let package = Package( "FirebaseStorage", .product(name: "nanopb", package: "nanopb"), ], - path: "SwiftPMTests/swift-test", - swiftSettings: [ - .interoperabilityMode(.Cxx), // C++ interoperability setting - ] + path: "SwiftPMTests/swift-test" ), .testTarget( name: "analytics-import-test", From 72ae07d6fdcf14f31964f7d9eeaa75eb3c64e3dc Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Tue, 12 Nov 2024 15:38:40 -0800 Subject: [PATCH 12/30] Revert "use @_implementationOnly" This reverts commit 4164fb9b01e17889e1d95757b3d11ee38ac94e0c. --- Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift | 4 ++-- Package.swift | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift index 8797915cc68..fafeec43e98 100644 --- a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift +++ b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift @@ -15,11 +15,11 @@ */ #if SWIFT_PACKAGE - @_implementationOnly import FirebaseFirestoreCpp + @_exported import FirebaseFirestoreCpp #endif // SWIFT_PACKAGE public class SwiftCallingCpp { - public static func print(_ value: String) { + public init(_ value: String) { CppInterfaceCalledBySwift.print(std.string(value)) } } diff --git a/Package.swift b/Package.swift index e9bb757db95..f7cdf77c9df 100644 --- a/Package.swift +++ b/Package.swift @@ -477,7 +477,10 @@ let package = Package( dependencies: [ "FirebaseFirestoreTarget", ], - path: "FirebaseCombineSwift/Sources/Firestore" + path: "FirebaseCombineSwift/Sources/Firestore", + swiftSettings: [ + .interoperabilityMode(.Cxx), // C++ interoperability setting + ] ), .target( name: "FirebaseStorageCombineSwift", @@ -1172,7 +1175,10 @@ let package = Package( "FirebaseStorage", .product(name: "nanopb", package: "nanopb"), ], - path: "SwiftPMTests/swift-test" + path: "SwiftPMTests/swift-test", + swiftSettings: [ + .interoperabilityMode(.Cxx), // C++ interoperability setting + ] ), .testTarget( name: "analytics-import-test", From 53b04714b827c07fc41d1957f24e9c8fa5b25d18 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Wed, 11 Dec 2024 22:30:32 -0500 Subject: [PATCH 13/30] implement pipeline files in C++ side --- Firestore/core/src/api/firestore.cc | 4 +++ Firestore/core/src/api/firestore.h | 3 ++ .../core/swift/include/FirebaseFirestoreCpp.h | 5 +++ .../core/swift/include/collection_stage.h | 29 +++++++++++++++ .../core/swift/include/firestore_pipeline.h | 25 +++++++++++++ Firestore/core/swift/include/pipeline.h | 32 +++++++++++++++++ .../core/swift/include/pipeline_source.h | 35 +++++++++++++++++++ Firestore/core/swift/include/stage.h | 23 ++++++++++++ Firestore/core/swift/src/collection_stage.cc | 17 +++++++++ .../core/swift/src/firestore_pipeline.cc | 16 +++++++++ Firestore/core/swift/src/pipeline.cc | 17 +++++++++ Firestore/core/swift/src/pipeline_source.cc | 23 ++++++++++++ Firestore/core/swift/src/stage.cc | 14 ++++++++ Package.swift | 9 +++++ 14 files changed, 252 insertions(+) create mode 100644 Firestore/core/swift/include/collection_stage.h create mode 100644 Firestore/core/swift/include/firestore_pipeline.h create mode 100644 Firestore/core/swift/include/pipeline.h create mode 100644 Firestore/core/swift/include/pipeline_source.h create mode 100644 Firestore/core/swift/include/stage.h create mode 100644 Firestore/core/swift/src/collection_stage.cc create mode 100644 Firestore/core/swift/src/firestore_pipeline.cc create mode 100644 Firestore/core/swift/src/pipeline.cc create mode 100644 Firestore/core/swift/src/pipeline_source.cc create mode 100644 Firestore/core/swift/src/stage.cc diff --git a/Firestore/core/src/api/firestore.cc b/Firestore/core/src/api/firestore.cc index 70cb975cc71..23152b5c444 100644 --- a/Firestore/core/src/api/firestore.cc +++ b/Firestore/core/src/api/firestore.cc @@ -227,6 +227,10 @@ void Firestore::SetClientLanguage(std::string language_token) { GrpcConnection::SetClientLanguage(std::move(language_token)); } +PipelineSource Firestore::pipeline() { + return {shared_from_this()}; +} + std::unique_ptr Firestore::AddSnapshotsInSyncListener( std::unique_ptr> listener) { EnsureClientConfigured(); diff --git a/Firestore/core/src/api/firestore.h b/Firestore/core/src/api/firestore.h index 9323b0a4e81..752c4fa568e 100644 --- a/Firestore/core/src/api/firestore.h +++ b/Firestore/core/src/api/firestore.h @@ -29,6 +29,7 @@ #include "Firestore/core/src/model/database_id.h" #include "Firestore/core/src/util/byte_stream.h" #include "Firestore/core/src/util/status_fwd.h" +#include "Firestore/core/swift/include/pipeline_source.h" namespace firebase { namespace firestore { @@ -125,6 +126,8 @@ class Firestore : public std::enable_shared_from_this { */ static void SetClientLanguage(std::string language_token); + PipelineSource pipeline(); + private: void EnsureClientConfigured(); core::DatabaseInfo MakeDatabaseInfo() const; diff --git a/Firestore/core/swift/include/FirebaseFirestoreCpp.h b/Firestore/core/swift/include/FirebaseFirestoreCpp.h index dd769230b8f..7738009bda2 100644 --- a/Firestore/core/swift/include/FirebaseFirestoreCpp.h +++ b/Firestore/core/swift/include/FirebaseFirestoreCpp.h @@ -17,6 +17,11 @@ #ifndef FIREBASE_FIREBASEFIRESTORECPP_H #define FIREBASE_FIREBASEFIRESTORECPP_H +#import "collection_stage.h" +#import "firestore_pipeline.h" +#import "pipeline.h" +#import "pipeline_source.h" +#import "stage.h" #import "used_by_swift.h" #endif // FIREBASE_FIREBASEFIRESTORECPP_H diff --git a/Firestore/core/swift/include/collection_stage.h b/Firestore/core/swift/include/collection_stage.h new file mode 100644 index 00000000000..2ffac6a132e --- /dev/null +++ b/Firestore/core/swift/include/collection_stage.h @@ -0,0 +1,29 @@ +// +// Created by Cheryl Lin on 2024-12-11. +// + +#ifndef FIREBASE_COLLECTION_GROUP_STAGE_H +#define FIREBASE_COLLECTION_GROUP_STAGE_H + +#include +#include "stage.h" + +namespace firebase { +namespace firestore { + +namespace api { + +class Collection : public Stage { + public: + Collection(std::string collection_path); + + private: + std::string collection_path_; +}; + +} // namespace api + +} // namespace firestore +} // namespace firebase + +#endif // FIREBASE_COLLECTION_GROUP_STAGE_H diff --git a/Firestore/core/swift/include/firestore_pipeline.h b/Firestore/core/swift/include/firestore_pipeline.h new file mode 100644 index 00000000000..6695d6a1b5f --- /dev/null +++ b/Firestore/core/swift/include/firestore_pipeline.h @@ -0,0 +1,25 @@ +// +// Created by Cheryl Lin on 2024-12-10. +// + +#ifndef FIREBASE_FIRESTORE_PIPELINE_H +#define FIREBASE_FIRESTORE_PIPELINE_H + +#include "pipeline_source.h" + +namespace firebase { +namespace firestore { + +namespace api { +class Firestore; + +class FirestorePipeline { + public: + PipelineSource pipeline(std::shared_ptr firestore); +}; + +} // namespace api +} // namespace firestore +} // namespace firebase + +#endif // FIREBASE_FIRESTORE_PIPELINE_H diff --git a/Firestore/core/swift/include/pipeline.h b/Firestore/core/swift/include/pipeline.h new file mode 100644 index 00000000000..4519d5371e1 --- /dev/null +++ b/Firestore/core/swift/include/pipeline.h @@ -0,0 +1,32 @@ +// +// Created by Cheryl Lin on 2024-12-11. +// + +#ifndef FIREBASE_PIPELINE_H +#define FIREBASE_PIPELINE_H + +#include +#include "stage.h" + +namespace firebase { +namespace firestore { + +namespace api { + +class Firestore; + +class Pipeline { + public: + Pipeline(std::shared_ptr firestore, Stage stage); + + private: + std::shared_ptr firestore_; + Stage stage_; +}; + +} // namespace api + +} // namespace firestore +} // namespace firebase + +#endif // FIREBASE_PIPELINE_H diff --git a/Firestore/core/swift/include/pipeline_source.h b/Firestore/core/swift/include/pipeline_source.h new file mode 100644 index 00000000000..a9d2d6f850a --- /dev/null +++ b/Firestore/core/swift/include/pipeline_source.h @@ -0,0 +1,35 @@ +// +// Created by Cheryl Lin on 2024-12-09. +// + +#ifndef FIREBASE_PIPELINE_SOURCE_H +#define FIREBASE_PIPELINE_SOURCE_H + +#include +#include +#include "pipeline.h" + +namespace firebase { +namespace firestore { + +namespace api { + +class Firestore; +class DocumentReference; + +class PipelineSource { + public: + PipelineSource(std::shared_ptr firestore); + + Pipeline GetCollection(std::string collection_path); + + private: + std::shared_ptr firestore_; +}; + +} // namespace api + +} // namespace firestore +} // namespace firebase + +#endif // FIREBASE_PIPELINE_SOURCE_H diff --git a/Firestore/core/swift/include/stage.h b/Firestore/core/swift/include/stage.h new file mode 100644 index 00000000000..3ff02f7ff4f --- /dev/null +++ b/Firestore/core/swift/include/stage.h @@ -0,0 +1,23 @@ +// +// Created by Cheryl Lin on 2024-12-11. +// + +#ifndef FIREBASE_STAGE_H +#define FIREBASE_STAGE_H + +namespace firebase { +namespace firestore { + +namespace api { + +class Stage { + public: + Stage(); +}; + +} // namespace api + +} // namespace firestore +} // namespace firebase + +#endif // FIREBASE_STAGE_H diff --git a/Firestore/core/swift/src/collection_stage.cc b/Firestore/core/swift/src/collection_stage.cc new file mode 100644 index 00000000000..cf05216b067 --- /dev/null +++ b/Firestore/core/swift/src/collection_stage.cc @@ -0,0 +1,17 @@ +#include "Firestore/core/swift/include/collection_stage.h" +#include + +namespace firebase { +namespace firestore { + +namespace api { + +Collection::Collection(std::string collection_path) + : collection_path_(collection_path) { + std::cout << "Calling Pipeline Collection ctor" << std::endl; +}; + +} // namespace api + +} // namespace firestore +} // namespace firebase \ No newline at end of file diff --git a/Firestore/core/swift/src/firestore_pipeline.cc b/Firestore/core/swift/src/firestore_pipeline.cc new file mode 100644 index 00000000000..f1711d8725d --- /dev/null +++ b/Firestore/core/swift/src/firestore_pipeline.cc @@ -0,0 +1,16 @@ +#include "Firestore/core/swift/include/firestore_pipeline.h" +#include "Firestore/core/src/api/firestore.h" + +namespace firebase { +namespace firestore { + +namespace api { + +PipelineSource FirestorePipeline::pipeline( + std::shared_ptr firestore) { + return firestore->pipeline(); +} + +} // namespace api +} // namespace firestore +} // namespace firebase \ No newline at end of file diff --git a/Firestore/core/swift/src/pipeline.cc b/Firestore/core/swift/src/pipeline.cc new file mode 100644 index 00000000000..070cb635d3a --- /dev/null +++ b/Firestore/core/swift/src/pipeline.cc @@ -0,0 +1,17 @@ +#include "Firestore/core/swift/include/pipeline.h" +#include +#include "Firestore/core/src/api/firestore.h" + +namespace firebase { +namespace firestore { + +namespace api { + +Pipeline::Pipeline(std::shared_ptr firestore, Stage stage) + : firestore_(firestore), stage_(stage) { +} + +} // namespace api + +} // namespace firestore +} // namespace firebase \ No newline at end of file diff --git a/Firestore/core/swift/src/pipeline_source.cc b/Firestore/core/swift/src/pipeline_source.cc new file mode 100644 index 00000000000..2157b001132 --- /dev/null +++ b/Firestore/core/swift/src/pipeline_source.cc @@ -0,0 +1,23 @@ + +#include "Firestore/core/swift/include/pipeline_source.h" +#include "Firestore/core/src/api/document_reference.h" +#include "Firestore/core/src/api/firestore.h" +#include "Firestore/core/swift/include/collection_stage.h" + +namespace firebase { +namespace firestore { + +namespace api { + +PipelineSource::PipelineSource(std::shared_ptr firestore) + : firestore_(firestore) { +} + +Pipeline PipelineSource::GetCollection(std::string collection_path) { + return {firestore_, Collection{collection_path}}; +} + +} // namespace api + +} // namespace firestore +} // namespace firebase \ No newline at end of file diff --git a/Firestore/core/swift/src/stage.cc b/Firestore/core/swift/src/stage.cc new file mode 100644 index 00000000000..f5d387655a0 --- /dev/null +++ b/Firestore/core/swift/src/stage.cc @@ -0,0 +1,14 @@ +#include "Firestore/core/swift/include/stage.h" + +namespace firebase { +namespace firestore { + +namespace api { + +Stage::Stage() { +} + +} // namespace api + +} // namespace firestore +} // namespace firebase \ No newline at end of file diff --git a/Package.swift b/Package.swift index f7cdf77c9df..32c10389320 100644 --- a/Package.swift +++ b/Package.swift @@ -1401,9 +1401,17 @@ func firestoreWrapperTarget() -> Target { func firebaseFirestoreCppTarget() -> Target { return .target( name: "FirebaseFirestoreCpp", + dependencies: [ + "FirebaseAppCheckInterop", + "FirebaseCore", + "leveldb", + .product(name: "nanopb", package: "nanopb"), + ], path: "Firestore/core/swift", publicHeadersPath: "include", // Path to the public headers cxxSettings: [ + .headerSearchPath("../../../"), + .headerSearchPath("../../Protos/nanopb"), .headerSearchPath("include"), // Ensure the header search path is correct ] ) @@ -1442,6 +1450,7 @@ func firestoreTargets() -> [Target] { "core/CMakeLists.txt", "core/src/util/config_detected.h.in", "core/test/", + "core/swift/", "fuzzing/", "test.sh", // Swift PM doesn't recognize hpp files, so we're relying on search paths From 2b647b85de67995bf35a01e860b7170d4880dfff Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Thu, 12 Dec 2024 22:59:56 -0500 Subject: [PATCH 14/30] add pipeline interface in cocoapods support --- .../Firestore.xcodeproj/project.pbxproj | 481 +++++++++--------- Firestore/Source/API/FIRFirestore+Internal.h | 2 - .../Public/FirebaseFirestore/FIRFirestore.h | 13 + .../AsyncAwait/Firestore+AsyncAwait.swift | 4 + .../Source/SwiftAPI/PipelineSource.swift | 14 + .../core/swift/include/firestore_pipeline.h | 2 +- Package.swift | 1 + 7 files changed, 283 insertions(+), 234 deletions(-) create mode 100644 Firestore/Swift/Source/SwiftAPI/PipelineSource.swift diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj index 7b6e8450bf1..dbc692eca2e 100644 --- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj +++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj @@ -18,6 +18,7 @@ 00F1CB487E8E0DA48F2E8FEC /* message_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = CE37875365497FFA8687B745 /* message_test.cc */; }; 00F49125748D47336BCDFB69 /* globals_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4564AD9C55EC39C080EB9476 /* globals_cache_test.cc */; }; 0131DEDEF2C3CCAB2AB918A5 /* nanopb_util_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6F5B6C1399F92FD60F2C582B /* nanopb_util_test.cc */; }; + 015701EFFF559DE3B35BC5AE /* Pods_Firestore_Tests_macOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11DF548295F98F22C70127D8 /* Pods_Firestore_Tests_macOS.framework */; }; 01C66732ECCB83AB1D896026 /* bundle.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = A366F6AE1A5A77548485C091 /* bundle.pb.cc */; }; 01CF72FBF97CEB0AEFD9FAFE /* leveldb_document_overlay_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AE89CFF09C6804573841397F /* leveldb_document_overlay_cache_test.cc */; }; 01D9704C3AAA13FAD2F962AB /* statusor_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54A0352D20A3B3D7003E0143 /* statusor_test.cc */; }; @@ -102,6 +103,7 @@ 0DDCAC7C7CA55CF10AE0E809 /* garbage_collection_spec_test.json in Resources */ = {isa = PBXBuildFile; fileRef = AAED89D7690E194EF3BA1132 /* garbage_collection_spec_test.json */; }; 0DDEE9FE08845BB7CA4607DE /* grpc_connection_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B6D9649021544D4F00EB9CFB /* grpc_connection_test.cc */; }; 0E17927CE45F5E3FC6691E24 /* firebase_auth_credentials_provider_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = F869D85E900E5AF6CD02E2FC /* firebase_auth_credentials_provider_test.mm */; }; + 0E24350AA378A5A8D9927B9D /* Pods_Firestore_FuzzTests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8BF18CE315969DD8049CDDD /* Pods_Firestore_FuzzTests_iOS.framework */; }; 0E4C94369FFF7EC0C9229752 /* iterator_adaptors_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54A0353420A3D8CB003E0143 /* iterator_adaptors_test.cc */; }; 0E4F266A9FDF55CD38BB6D0F /* leveldb_query_engine_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = DB1F1E1B1ED15E8D042144B1 /* leveldb_query_engine_test.cc */; }; 0EA40EDACC28F445F9A3F32F /* pretty_printing_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB323F9553050F4F6490F9FF /* pretty_printing_test.cc */; }; @@ -233,7 +235,6 @@ 2045517602D767BD01EA71D9 /* overlay_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = E1459FA70B8FC18DE4B80D0D /* overlay_test.cc */; }; 205601D1C6A40A4DD3BBAA04 /* target_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 526D755F65AC676234F57125 /* target_test.cc */; }; 20814A477D00EA11D0E76631 /* FIRDocumentSnapshotTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E04B202154AA00B64F25 /* FIRDocumentSnapshotTests.mm */; }; - 20A26E9D0336F7F32A098D05 /* Pods_Firestore_IntegrationTests_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2220F583583EFC28DE792ABE /* Pods_Firestore_IntegrationTests_tvOS.framework */; }; 20A93AC59CD5A7AC41F10412 /* thread_safe_memoizer_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1A8141230C7E3986EACEF0B6 /* thread_safe_memoizer_test.cc */; }; 211A60ECA3976D27C0BF59BB /* md5_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 3D050936A2D52257FD17FB6E /* md5_test.cc */; }; 21836C4D9D48F962E7A3A244 /* ordered_code_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB380D03201BC6E400D97691 /* ordered_code_test.cc */; }; @@ -357,7 +358,6 @@ 353E47129584B8DDF10138BD /* stream_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 5B5414D28802BC76FDADABD6 /* stream_test.cc */; }; 35503DAC4FD0D765A2DE82A8 /* byte_stream_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 432C71959255C5DBDF522F52 /* byte_stream_test.cc */; }; 355A9171EF3F7AD44A9C60CB /* document_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB6B908320322E4D00CC290A /* document_test.cc */; }; - 358DBA8B2560C65D9EB23C35 /* Pods_Firestore_IntegrationTests_macOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 39B832380209CC5BAF93BC52 /* Pods_Firestore_IntegrationTests_macOS.framework */; }; 35C330499D50AC415B24C580 /* async_testing.cc in Sources */ = {isa = PBXBuildFile; fileRef = 872C92ABD71B12784A1C5520 /* async_testing.cc */; }; 35DB74DFB2F174865BCCC264 /* leveldb_transaction_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 88CF09277CFA45EE1273E3BA /* leveldb_transaction_test.cc */; }; 35FEB53E165518C0DE155CB0 /* target_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 526D755F65AC676234F57125 /* target_test.cc */; }; @@ -436,6 +436,7 @@ 457171CE2510EEA46F7D8A30 /* FIRFirestoreTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5467FAFF203E56F8009C9584 /* FIRFirestoreTests.mm */; }; 45939AFF906155EA27D281AB /* annotations.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9520B89AAC00B5BCE7 /* annotations.pb.cc */; }; 45A5504D33D39C6F80302450 /* async_queue_libdispatch_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = B6FB4680208EA0BE00554BA2 /* async_queue_libdispatch_test.mm */; }; + 45CA70C602DD3DDAEF05DCAA /* Pods_Firestore_Tests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BAAC6F56A47F795224077898 /* Pods_Firestore_Tests_iOS.framework */; }; 45CECACC11031B4FA6A2F4E8 /* bundle_loader_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = A853C81A6A5A51C9D0389EDA /* bundle_loader_test.cc */; }; 45FF545C6421398E9E1D647E /* persistence_spec_test.json in Resources */ = {isa = PBXBuildFile; fileRef = 54DA12A31F315EE100DD57A1 /* persistence_spec_test.json */; }; 4616CB6342775972F49EDB9B /* leveldb_lru_garbage_collector_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B629525F7A1AAC1AB765C74F /* leveldb_lru_garbage_collector_test.cc */; }; @@ -470,17 +471,16 @@ 4A52CEB97A43F2F3ABC6A5C8 /* stream_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 5B5414D28802BC76FDADABD6 /* stream_test.cc */; }; 4A62B708A6532DD45414DA3A /* sorted_set_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 549CCA4C20A36DBB00BCEB75 /* sorted_set_test.cc */; }; 4A64A339BCA77B9F875D1D8B /* FSTDatastoreTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E07E202154EC00B64F25 /* FSTDatastoreTests.mm */; }; - 4AA4ABE36065DB79CD76DD8D /* Pods_Firestore_Benchmarks_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F694C3CE4B77B3C0FA4BBA53 /* Pods_Firestore_Benchmarks_iOS.framework */; }; 4AD9809C9CE9FA09AC40992F /* async_queue_libdispatch_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = B6FB4680208EA0BE00554BA2 /* async_queue_libdispatch_test.mm */; }; 4ADBF70036448B1395DC5657 /* leveldb_query_engine_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = DB1F1E1B1ED15E8D042144B1 /* leveldb_query_engine_test.cc */; }; 4B54FA587C7107973FD76044 /* FIRBundlesTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 776530F066E788C355B78457 /* FIRBundlesTests.mm */; }; 4B5FA86D9568ECE20C6D3AD1 /* bundle_spec_test.json in Resources */ = {isa = PBXBuildFile; fileRef = 79EAA9F7B1B9592B5F053923 /* bundle_spec_test.json */; }; 4BFEEB7FDD7CD5A693B5B5C1 /* index_manager_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AE4A9E38D65688EE000EE2A1 /* index_manager_test.cc */; }; 4C17393656A7D6255AA998B3 /* Validation_BloomFilterTest_MD5_50000_1_bloom_filter_proto.json in Resources */ = {isa = PBXBuildFile; fileRef = 4B3E4A77493524333133C5DC /* Validation_BloomFilterTest_MD5_50000_1_bloom_filter_proto.json */; }; + 4C1C2BAA580E29B15E3E5C6B /* Pods_Firestore_Tests_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46E38E88A7A020F4E721E373 /* Pods_Firestore_Tests_tvOS.framework */; }; 4C4D780CA9367DBA324D97FF /* load_bundle_task_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8F1A7B4158D9DD76EE4836BF /* load_bundle_task_test.cc */; }; 4C5292BF643BF14FA2AC5DB1 /* settings_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = DD12BC1DB2480886D2FB0005 /* settings_test.cc */; }; 4C66806697D7BCA730FA3697 /* common.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 544129D221C2DDC800EFB9CC /* common.pb.cc */; }; - 4CC78CA0E9E03F5DCF13FEBD /* Pods_Firestore_Tests_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D7DF4A6F740086A2D8C0E28E /* Pods_Firestore_Tests_tvOS.framework */; }; 4CDFF1AE3D639AA89C5C4411 /* query_spec_test.json in Resources */ = {isa = PBXBuildFile; fileRef = 731541602214AFFA0037F4DC /* query_spec_test.json */; }; 4D1775B7916D4CDAD1BF1876 /* bundle.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = A366F6AE1A5A77548485C091 /* bundle.pb.cc */; }; 4D20563D846FA0F3BEBFDE9D /* overlay_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = E1459FA70B8FC18DE4B80D0D /* overlay_test.cc */; }; @@ -681,7 +681,6 @@ 5C9B5696644675636A052018 /* token_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = A082AFDD981B07B5AD78FDE8 /* token_test.cc */; }; 5CADE71A1CA6358E1599F0F9 /* hashing_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54511E8D209805F8005BD28F /* hashing_test.cc */; }; 5CEB0E83DA68652927D2CF07 /* memory_document_overlay_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 29D9C76922DAC6F710BC1EF4 /* memory_document_overlay_cache_test.cc */; }; - 5D405BE298CE4692CB00790A /* Pods_Firestore_Tests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B50B3A0DF77100EEE887891 /* Pods_Firestore_Tests_iOS.framework */; }; 5D45CC300ED037358EF33A8F /* snapshot_version_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = ABA495B9202B7E79008A7851 /* snapshot_version_test.cc */; }; 5D51D8B166D24EFEF73D85A2 /* transform_operation_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 33607A3AE91548BD219EC9C6 /* transform_operation_test.cc */; }; 5D5E24E3FA1128145AA117D2 /* autoid_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54740A521FC913E500713A1A /* autoid_test.cc */; }; @@ -951,6 +950,7 @@ 8460C97C9209D7DAF07090BD /* FIRFieldsTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E06A202154D500B64F25 /* FIRFieldsTests.mm */; }; 84E75527F3739131C09BEAA5 /* target_index_matcher_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 63136A2371C0C013EC7A540C /* target_index_matcher_test.cc */; }; 851346D66DEC223E839E3AA9 /* memory_mutation_queue_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 74FBEFA4FE4B12C435011763 /* memory_mutation_queue_test.cc */; }; + 85508B8C56FCCC391567D2FE /* Pods_Firestore_Example_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28346A8BA0E120EF68190661 /* Pods_Firestore_Example_tvOS.framework */; }; 856A1EAAD674ADBDAAEDAC37 /* bundle_builder.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4F5B96F3ABCD2CA901DB1CD4 /* bundle_builder.cc */; }; 85A33A9CE33207C2333DDD32 /* FIRTransactionOptionsTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = CF39ECA1293D21A0A2AB2626 /* FIRTransactionOptionsTests.mm */; }; 85B8918FC8C5DC62482E39C3 /* resource_path_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B686F2B02024FFD70028D6BE /* resource_path_test.cc */; }; @@ -973,6 +973,7 @@ 87B5AC3EBF0E83166B142FA4 /* string_apple_benchmark.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C73C0CC6F62A90D8573F383 /* string_apple_benchmark.mm */; }; 881E55152AB34465412F8542 /* FSTAPIHelpers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E04E202154AA00B64F25 /* FSTAPIHelpers.mm */; }; 88929ED628DA8DD9592974ED /* task_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 899FC22684B0F7BEEAE13527 /* task_test.cc */; }; + 88C8E23A88BDB3FDF7AB686B /* Pods_Firestore_Benchmarks_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F598CD89DBDF6EE959C7F82 /* Pods_Firestore_Benchmarks_iOS.framework */; }; 88FD82A1FC5FEC5D56B481D8 /* maybe_document.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE7E20B89AAC00B5BCE7 /* maybe_document.pb.cc */; }; 897F3C1936612ACB018CA1DD /* http.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9720B89AAC00B5BCE7 /* http.pb.cc */; }; 89C71AEAA5316836BB1D5A01 /* view_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = C7429071B33BDF80A7FA2F8A /* view_test.cc */; }; @@ -989,7 +990,6 @@ 8B3EB33933D11CF897EAF4C3 /* leveldb_index_manager_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 166CE73C03AB4366AAC5201C /* leveldb_index_manager_test.cc */; }; 8C39F6D4B3AA9074DF00CFB8 /* string_util_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB380CFC201A2EE200D97691 /* string_util_test.cc */; }; 8C602DAD4E8296AB5EFB962A /* firestore.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 544129D421C2DDC800EFB9CC /* firestore.pb.cc */; }; - 8C82D4D3F9AB63E79CC52DC8 /* Pods_Firestore_IntegrationTests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECEBABC7E7B693BE808A1052 /* Pods_Firestore_IntegrationTests_iOS.framework */; }; 8D0EF43F1B7B156550E65C20 /* FSTGoogleTestTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 54764FAE1FAA21B90085E60A /* FSTGoogleTestTests.mm */; }; 8DBA8DC55722ED9D3A1BB2C9 /* Validation_BloomFilterTest_MD5_5000_1_membership_test_result.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A7D48A017ECB54FD381D126 /* Validation_BloomFilterTest_MD5_5000_1_membership_test_result.json */; }; 8E103A426D6E650DC338F281 /* Validation_BloomFilterTest_MD5_50000_01_membership_test_result.json in Resources */ = {isa = PBXBuildFile; fileRef = C8FB22BCB9F454DA44BA80C8 /* Validation_BloomFilterTest_MD5_50000_01_membership_test_result.json */; }; @@ -998,6 +998,7 @@ 8F2055702DB5EE8DA4BACD7C /* memory_document_overlay_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 29D9C76922DAC6F710BC1EF4 /* memory_document_overlay_cache_test.cc */; }; 8F3AE423677A4C50F7E0E5C0 /* database_info_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB38D92E20235D22000A432D /* database_info_test.cc */; }; 8F4F40E9BC7ED588F67734D5 /* app_testing.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5467FB07203E6A44009C9584 /* app_testing.mm */; }; + 8F59A2CC5A9E99BB2DEA7F91 /* Pods_Firestore_IntegrationTests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B96FB42852D4E66ABEFB057 /* Pods_Firestore_IntegrationTests_iOS.framework */; }; 8F781F527ED72DC6C123689E /* autoid_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54740A521FC913E500713A1A /* autoid_test.cc */; }; 9009C285F418EA80C46CF06B /* fake_target_metadata_provider.cc in Sources */ = {isa = PBXBuildFile; fileRef = 71140E5D09C6E76F7C71B2FC /* fake_target_metadata_provider.cc */; }; 900D0E9F18CE3DB954DD0D1E /* async_queue_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B6FB467B208E9A8200554BA2 /* async_queue_test.cc */; }; @@ -1081,6 +1082,7 @@ A0ED6C684A58A0077A5F9606 /* Validation_BloomFilterTest_MD5_5000_1_membership_test_result.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A7D48A017ECB54FD381D126 /* Validation_BloomFilterTest_MD5_5000_1_membership_test_result.json */; }; A124744C6CBEF3DD415A1A72 /* FSTUserDataReaderTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8D9892F204959C50613F16C8 /* FSTUserDataReaderTests.mm */; }; A1563EFEB021936D3FFE07E3 /* field_mask_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 549CCA5320A36E1F00BCEB75 /* field_mask_test.cc */; }; + A15F2B65D767C12F6DD6AB9B /* Pods_Firestore_IntegrationTests_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBE307380F90541FBDEC17C6 /* Pods_Firestore_IntegrationTests_tvOS.framework */; }; A17DBC8F24127DA8A381F865 /* testutil.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54A0352820A3B3BD003E0143 /* testutil.cc */; }; A186FECD0257B92FDB0E83B8 /* Validation_BloomFilterTest_MD5_50000_0001_membership_test_result.json in Resources */ = {isa = PBXBuildFile; fileRef = 5B96CC29E9946508F022859C /* Validation_BloomFilterTest_MD5_50000_0001_membership_test_result.json */; }; A192648233110B7B8BD65528 /* field_transform_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7515B47C92ABEEC66864B55C /* field_transform_test.cc */; }; @@ -1270,6 +1272,7 @@ BCAC9F7A865BD2320A4D8752 /* bloom_filter_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = A2E6F09AD1EE0A6A452E9A08 /* bloom_filter_test.cc */; }; BD3A421C9E40C57D25697E75 /* Validation_BloomFilterTest_MD5_500_01_bloom_filter_proto.json in Resources */ = {isa = PBXBuildFile; fileRef = 4BD051DBE754950FEAC7A446 /* Validation_BloomFilterTest_MD5_500_01_bloom_filter_proto.json */; }; BD6CC8614970A3D7D2CF0D49 /* exponential_backoff_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B6D1B68420E2AB1A00B35856 /* exponential_backoff_test.cc */; }; + BDA770C3B110516CDC35164D /* Pods_Firestore_Example_macOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75532670EC61672D0CF0D743 /* Pods_Firestore_Example_macOS.framework */; }; BDD2D1812BAD962E3C81A53F /* hashing_test_apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = B69CF3F02227386500B281C8 /* hashing_test_apple.mm */; }; BDDAE67000DBF10E9EA7FED0 /* nanopb_util_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6F5B6C1399F92FD60F2C582B /* nanopb_util_test.cc */; }; BDF3A6C121F2773BB3A347A7 /* counting_query_engine.cc in Sources */ = {isa = PBXBuildFile; fileRef = 99434327614FEFF7F7DC88EC /* counting_query_engine.cc */; }; @@ -1294,11 +1297,9 @@ C1B4621C0820EEB0AC9CCD22 /* bits_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB380D01201BC69F00D97691 /* bits_test.cc */; }; C1C3369C7ECE069B76A84AD1 /* Validation_BloomFilterTest_MD5_500_1_membership_test_result.json in Resources */ = {isa = PBXBuildFile; fileRef = 8AB49283E544497A9C5A0E59 /* Validation_BloomFilterTest_MD5_500_1_membership_test_result.json */; }; C1CD78F1FDE0918B4F87BC6F /* empty_credentials_provider_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8FA60B08D59FEA0D6751E87F /* empty_credentials_provider_test.cc */; }; - C1E35BCE2CFF9B56C28545A2 /* Pods_Firestore_Example_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 62E103B28B48A81D682A0DE9 /* Pods_Firestore_Example_tvOS.framework */; }; C1F196EC5A7C112D2F7C7724 /* view_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = C7429071B33BDF80A7FA2F8A /* view_test.cc */; }; C1F8991BD11FFD705D74244F /* random_access_queue_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 014C60628830D95031574D15 /* random_access_queue_test.cc */; }; C20151B20ACE518267B4850C /* Validation_BloomFilterTest_MD5_500_0001_membership_test_result.json in Resources */ = {isa = PBXBuildFile; fileRef = 478DC75A0DCA6249A616DD30 /* Validation_BloomFilterTest_MD5_500_0001_membership_test_result.json */; }; - C21B3A1CCB3AD42E57EA14FC /* Pods_Firestore_Tests_macOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 759E964B6A03E6775C992710 /* Pods_Firestore_Tests_macOS.framework */; }; C23552A6D9FB0557962870C2 /* local_store_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 307FF03D0297024D59348EBD /* local_store_test.cc */; }; C240DB0498C1C84C6AFA4C8D /* Validation_BloomFilterTest_MD5_50000_01_bloom_filter_proto.json in Resources */ = {isa = PBXBuildFile; fileRef = 7B44DD11682C4803B73DCC34 /* Validation_BloomFilterTest_MD5_50000_01_bloom_filter_proto.json */; }; C25F321AC9BF8D1CFC8543AF /* reference_set_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 132E32997D781B896672D30A /* reference_set_test.cc */; }; @@ -1311,7 +1312,6 @@ C437916821C90F04F903EB96 /* fields_array_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = BA4CBA48204C9E25B56993BC /* fields_array_test.cc */; }; C43A555928CB0441096F82D2 /* FIRDocumentReferenceTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E049202154AA00B64F25 /* FIRDocumentReferenceTests.mm */; }; C4548D8C790387C8E64F0FC4 /* leveldb_snappy_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D9D94300B9C02F7069523C00 /* leveldb_snappy_test.cc */; }; - C482E724F4B10968417C3F78 /* Pods_Firestore_FuzzTests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B79CA87A1A01FC5329031C9B /* Pods_Firestore_FuzzTests_iOS.framework */; }; C4C7A8D11DC394EF81B7B1FA /* filesystem_testing.cc in Sources */ = {isa = PBXBuildFile; fileRef = BA02DA2FCD0001CFC6EB08DA /* filesystem_testing.cc */; }; C4D430E12F46F05416A66E0A /* globals_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4564AD9C55EC39C080EB9476 /* globals_cache_test.cc */; }; C524026444E83EEBC1773650 /* objc_type_traits_apple_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2A0CF41BA5AED6049B0BEB2C /* objc_type_traits_apple_test.mm */; }; @@ -1332,7 +1332,6 @@ C8BA36C8B5E26C173F91E677 /* aggregation_result.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = D872D754B8AD88E28AF28B28 /* aggregation_result.pb.cc */; }; C8BC50508337800E8B098F57 /* bundle_loader_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = A853C81A6A5A51C9D0389EDA /* bundle_loader_test.cc */; }; C8C4CB7B6E23FC340BEC6D7F /* load_bundle_task_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8F1A7B4158D9DD76EE4836BF /* load_bundle_task_test.cc */; }; - C8D3CE2343E53223E6487F2C /* Pods_Firestore_Example_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5918805E993304321A05E82B /* Pods_Firestore_Example_iOS.framework */; }; C901A1BFD553B6DD70BB7CC7 /* bundle_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = F7FC06E0A47D393DE1759AE1 /* bundle_cache_test.cc */; }; C961FA581F87000DF674BBC8 /* field_transform_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7515B47C92ABEEC66864B55C /* field_transform_test.cc */; }; C97CD9EA59E9BBEFE17E94D6 /* Validation_BloomFilterTest_MD5_5000_01_bloom_filter_proto.json in Resources */ = {isa = PBXBuildFile; fileRef = 57F8EE51B5EFC9FAB185B66C /* Validation_BloomFilterTest_MD5_5000_01_bloom_filter_proto.json */; }; @@ -1437,7 +1436,6 @@ DCD83C545D764FB15FD88B02 /* counting_query_engine.cc in Sources */ = {isa = PBXBuildFile; fileRef = 99434327614FEFF7F7DC88EC /* counting_query_engine.cc */; }; DD04F7FE7A1ADE230A247DBC /* byte_stream_apple_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7628664347B9C96462D4BF17 /* byte_stream_apple_test.mm */; }; DD0F288108714D5A406D0A9F /* Validation_BloomFilterTest_MD5_1_01_membership_test_result.json in Resources */ = {isa = PBXBuildFile; fileRef = 5C68EE4CB94C0DD6E333F546 /* Validation_BloomFilterTest_MD5_1_01_membership_test_result.json */; }; - DD213F68A6F79E1D4924BD95 /* Pods_Firestore_Example_macOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E42355285B9EF55ABD785792 /* Pods_Firestore_Example_macOS.framework */; }; DD5976A45071455FF3FE74B8 /* string_win_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 79507DF8378D3C42F5B36268 /* string_win_test.cc */; }; DD6C480629B3F87933FAF440 /* filesystem_testing.cc in Sources */ = {isa = PBXBuildFile; fileRef = BA02DA2FCD0001CFC6EB08DA /* filesystem_testing.cc */; }; DD935E243A64A4EB688E4C1C /* credentials_provider_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 2F4FA4576525144C5069A7A5 /* credentials_provider_test.cc */; }; @@ -1457,6 +1455,7 @@ DF7ABEB48A650117CBEBCD26 /* object_value_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 214877F52A705012D6720CA0 /* object_value_test.cc */; }; DF96816EC67F9B8DF19B0CFD /* document_overlay_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = FFCA39825D9678A03D1845D0 /* document_overlay_cache_test.cc */; }; DF983A9C1FBF758AF3AF110D /* aggregation_result.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = D872D754B8AD88E28AF28B28 /* aggregation_result.pb.cc */; }; + DFA186FE5BBFB484C2A60439 /* Pods_Firestore_Example_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27A5406BD14580197A127B93 /* Pods_Firestore_Example_iOS.framework */; }; E042112665DD2504E3F495D5 /* Validation_BloomFilterTest_MD5_5000_1_bloom_filter_proto.json in Resources */ = {isa = PBXBuildFile; fileRef = 4375BDCDBCA9938C7F086730 /* Validation_BloomFilterTest_MD5_5000_1_bloom_filter_proto.json */; }; E04607A1E2964684184E8AEA /* index_spec_test.json in Resources */ = {isa = PBXBuildFile; fileRef = 8C7278B604B8799F074F4E8C /* index_spec_test.json */; }; E08297B35E12106105F448EB /* ordered_code_benchmark.cc in Sources */ = {isa = PBXBuildFile; fileRef = 0473AFFF5567E667A125347B /* ordered_code_benchmark.cc */; }; @@ -1570,6 +1569,7 @@ F10A3E4E164A5458DFF7EDE6 /* leveldb_remote_document_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 0840319686A223CC4AD3FAB1 /* leveldb_remote_document_cache_test.cc */; }; F17DDCAC8DE5A47A777F94FC /* Validation_BloomFilterTest_MD5_1_1_bloom_filter_proto.json in Resources */ = {isa = PBXBuildFile; fileRef = 3FDD0050CA08C8302400C5FB /* Validation_BloomFilterTest_MD5_1_1_bloom_filter_proto.json */; }; F184E5367DF3CA158EDE8532 /* testing_hooks_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = A002425BC4FC4E805F4175B6 /* testing_hooks_test.cc */; }; + F18612553F91C525D20F4A53 /* Pods_Firestore_IntegrationTests_macOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7AF095C33956262DE72A79C7 /* Pods_Firestore_IntegrationTests_macOS.framework */; }; F19B749671F2552E964422F7 /* FIRListenerRegistrationTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E06B202154D500B64F25 /* FIRListenerRegistrationTests.mm */; }; F1EAEE9DF819C017A9506AEB /* FIRIndexingTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 795AA8FC31D2AF6864B07D39 /* FIRIndexingTests.mm */; }; F1F8FB9254E9A5107161A7B2 /* Validation_BloomFilterTest_MD5_500_01_membership_test_result.json in Resources */ = {isa = PBXBuildFile; fileRef = DD990FD89C165F4064B4F608 /* Validation_BloomFilterTest_MD5_500_01_membership_test_result.json */; }; @@ -1704,14 +1704,14 @@ 0840319686A223CC4AD3FAB1 /* leveldb_remote_document_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = leveldb_remote_document_cache_test.cc; sourceTree = ""; }; 0D964D4936953635AC7E0834 /* Validation_BloomFilterTest_MD5_1_01_bloom_filter_proto.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_1_01_bloom_filter_proto.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_1_01_bloom_filter_proto.json; sourceTree = ""; }; 0EE5300F8233D14025EF0456 /* string_apple_test.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = string_apple_test.mm; sourceTree = ""; }; - 11984BA0A99D7A7ABA5B0D90 /* Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.release.xcconfig"; sourceTree = ""; }; + 11DF548295F98F22C70127D8 /* Pods_Firestore_Tests_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Tests_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1235769122B7E915007DDFA9 /* EncodableFieldValueTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncodableFieldValueTests.swift; sourceTree = ""; }; 1235769422B86E65007DDFA9 /* FirestoreEncoderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FirestoreEncoderTests.swift; sourceTree = ""; }; 124C932B22C1642C00CA8C2D /* CodableIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableIntegrationTests.swift; sourceTree = ""; }; - 1277F98C20D2DF0867496976 /* Pods-Firestore_IntegrationTests_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_IntegrationTests_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_IntegrationTests_iOS/Pods-Firestore_IntegrationTests_iOS.debug.xcconfig"; sourceTree = ""; }; 129A369928CA555B005AE7E2 /* FIRCountTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRCountTests.mm; sourceTree = ""; }; 12F4357299652983A615F886 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 132E32997D781B896672D30A /* reference_set_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = reference_set_test.cc; sourceTree = ""; }; + 161C4C78B78C56AAF4EBDF4E /* Pods-Firestore_IntegrationTests_macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_IntegrationTests_macOS.debug.xcconfig"; path = "Target Support Files/Pods-Firestore_IntegrationTests_macOS/Pods-Firestore_IntegrationTests_macOS.debug.xcconfig"; sourceTree = ""; }; 166CE73C03AB4366AAC5201C /* leveldb_index_manager_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = leveldb_index_manager_test.cc; sourceTree = ""; }; 1A7D48A017ECB54FD381D126 /* Validation_BloomFilterTest_MD5_5000_1_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_5000_1_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_5000_1_membership_test_result.json; sourceTree = ""; }; 1A8141230C7E3986EACEF0B6 /* thread_safe_memoizer_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = thread_safe_memoizer_test.cc; sourceTree = ""; }; @@ -1723,18 +1723,18 @@ 1E0C7C0DCD2790019E66D8CC /* bloom_filter.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = bloom_filter.pb.cc; sourceTree = ""; }; 1F50E872B3F117A674DA8E94 /* index_backfiller_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = index_backfiller_test.cc; sourceTree = ""; }; 214877F52A705012D6720CA0 /* object_value_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = object_value_test.cc; sourceTree = ""; }; - 2220F583583EFC28DE792ABE /* Pods_Firestore_IntegrationTests_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_IntegrationTests_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2286F308EFB0534B1BDE05B9 /* memory_target_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = memory_target_cache_test.cc; sourceTree = ""; }; 277EAACC4DD7C21332E8496A /* lru_garbage_collector_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = lru_garbage_collector_test.cc; sourceTree = ""; }; + 27A5406BD14580197A127B93 /* Pods_Firestore_Example_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Example_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 28346A8BA0E120EF68190661 /* Pods_Firestore_Example_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Example_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 28B45B2104E2DAFBBF86DBB7 /* logic_utils_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = logic_utils_test.cc; sourceTree = ""; }; 29D9C76922DAC6F710BC1EF4 /* memory_document_overlay_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = memory_document_overlay_cache_test.cc; sourceTree = ""; }; 2A0CF41BA5AED6049B0BEB2C /* objc_type_traits_apple_test.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = objc_type_traits_apple_test.mm; sourceTree = ""; }; - 2B50B3A0DF77100EEE887891 /* Pods_Firestore_Tests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Tests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2B60312099B9CFAE3040FAC1 /* Pods-Firestore_FuzzTests_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_FuzzTests_iOS.release.xcconfig"; path = "Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS.release.xcconfig"; sourceTree = ""; }; + 2B96FB42852D4E66ABEFB057 /* Pods_Firestore_IntegrationTests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_IntegrationTests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2D7472BC70C024D736FF74D9 /* watch_change_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = watch_change_test.cc; sourceTree = ""; }; 2DAA26538D1A93A39F8AC373 /* nanopb_testing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = nanopb_testing.h; path = nanopb/nanopb_testing.h; sourceTree = ""; }; - 2E48431B0EDA400BEA91D4AB /* Pods-Firestore_Tests_tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Tests_tvOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Tests_tvOS/Pods-Firestore_Tests_tvOS.debug.xcconfig"; sourceTree = ""; }; 2F4FA4576525144C5069A7A5 /* credentials_provider_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = credentials_provider_test.cc; path = credentials/credentials_provider_test.cc; sourceTree = ""; }; - 2F901F31BC62444A476B779F /* Pods-Firestore_IntegrationTests_macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_IntegrationTests_macOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_IntegrationTests_macOS/Pods-Firestore_IntegrationTests_macOS.debug.xcconfig"; sourceTree = ""; }; 3068AA9DFBBA86C1FE2A946E /* mutation_queue_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = mutation_queue_test.cc; sourceTree = ""; }; 307FF03D0297024D59348EBD /* local_store_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = local_store_test.cc; sourceTree = ""; }; 312E4667E3D994592C77B63C /* byte_stream_test.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = byte_stream_test.h; sourceTree = ""; }; @@ -1745,16 +1745,13 @@ 33607A3AE91548BD219EC9C6 /* transform_operation_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = transform_operation_test.cc; sourceTree = ""; }; 3369AC938F82A70685C5ED58 /* Validation_BloomFilterTest_MD5_1_1_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_1_1_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_1_1_membership_test_result.json; sourceTree = ""; }; 358C3B5FE573B1D60A4F7592 /* strerror_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = strerror_test.cc; sourceTree = ""; }; - 36D235D9F1240D5195CDB670 /* Pods-Firestore_IntegrationTests_tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_IntegrationTests_tvOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_IntegrationTests_tvOS/Pods-Firestore_IntegrationTests_tvOS.release.xcconfig"; sourceTree = ""; }; + 3819FBEB244A6E23FB69B046 /* Pods-Firestore_IntegrationTests_tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_IntegrationTests_tvOS.debug.xcconfig"; path = "Target Support Files/Pods-Firestore_IntegrationTests_tvOS/Pods-Firestore_IntegrationTests_tvOS.debug.xcconfig"; sourceTree = ""; }; 3841925AA60E13A027F565E6 /* Validation_BloomFilterTest_MD5_50000_1_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_50000_1_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_50000_1_membership_test_result.json; sourceTree = ""; }; 395E8B07639E69290A929695 /* index.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = index.pb.cc; path = admin/index.pb.cc; sourceTree = ""; }; - 397FB002E298B780F1E223E2 /* Pods-Firestore_Tests_macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Tests_macOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Tests_macOS/Pods-Firestore_Tests_macOS.release.xcconfig"; sourceTree = ""; }; - 39B832380209CC5BAF93BC52 /* Pods_Firestore_IntegrationTests_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_IntegrationTests_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B843E4A1F3930A400548890 /* remote_store_spec_test.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = remote_store_spec_test.json; sourceTree = ""; }; - 3C81DE3772628FE297055662 /* Pods-Firestore_Example_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_iOS/Pods-Firestore_Example_iOS.debug.xcconfig"; sourceTree = ""; }; 3CAA33F964042646FDDAF9F9 /* status_testing.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = status_testing.cc; sourceTree = ""; }; 3D050936A2D52257FD17FB6E /* md5_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = md5_test.cc; sourceTree = ""; }; - 3F0992A4B83C60841C52E960 /* Pods-Firestore_Example_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_iOS/Pods-Firestore_Example_iOS.release.xcconfig"; sourceTree = ""; }; + 3E26017832D28D24F2E391C5 /* Pods-Firestore_Example_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_iOS.release.xcconfig"; path = "Target Support Files/Pods-Firestore_Example_iOS/Pods-Firestore_Example_iOS.release.xcconfig"; sourceTree = ""; }; 3FBAA6F05C0B46A522E3B5A7 /* bundle_cache_test.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = bundle_cache_test.h; sourceTree = ""; }; 3FDD0050CA08C8302400C5FB /* Validation_BloomFilterTest_MD5_1_1_bloom_filter_proto.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_1_1_bloom_filter_proto.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_1_1_bloom_filter_proto.json; sourceTree = ""; }; 403DBF6EFB541DFD01582AA3 /* path_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = path_test.cc; sourceTree = ""; }; @@ -1765,8 +1762,10 @@ 4375BDCDBCA9938C7F086730 /* Validation_BloomFilterTest_MD5_5000_1_bloom_filter_proto.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_5000_1_bloom_filter_proto.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_5000_1_bloom_filter_proto.json; sourceTree = ""; }; 444B7AB3F5A2929070CB1363 /* hard_assert_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = hard_assert_test.cc; sourceTree = ""; }; 4564AD9C55EC39C080EB9476 /* globals_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; path = globals_cache_test.cc; sourceTree = ""; }; + 46E38E88A7A020F4E721E373 /* Pods_Firestore_Tests_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Tests_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 478DC75A0DCA6249A616DD30 /* Validation_BloomFilterTest_MD5_500_0001_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_500_0001_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_500_0001_membership_test_result.json; sourceTree = ""; }; 48D0915834C3D234E5A875A9 /* grpc_stream_tester.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = grpc_stream_tester.h; sourceTree = ""; }; + 4A67C88EC98B1BBD4615BB12 /* Pods-Firestore_Tests_tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Tests_tvOS.release.xcconfig"; path = "Target Support Files/Pods-Firestore_Tests_tvOS/Pods-Firestore_Tests_tvOS.release.xcconfig"; sourceTree = ""; }; 4B3E4A77493524333133C5DC /* Validation_BloomFilterTest_MD5_50000_1_bloom_filter_proto.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_50000_1_bloom_filter_proto.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_50000_1_bloom_filter_proto.json; sourceTree = ""; }; 4B59C0A7B2A4548496ED4E7D /* Validation_BloomFilterTest_MD5_1_0001_bloom_filter_proto.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_1_0001_bloom_filter_proto.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_1_0001_bloom_filter_proto.json; sourceTree = ""; }; 4BD051DBE754950FEAC7A446 /* Validation_BloomFilterTest_MD5_500_01_bloom_filter_proto.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_500_01_bloom_filter_proto.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_500_01_bloom_filter_proto.json; sourceTree = ""; }; @@ -1774,6 +1773,7 @@ 4D65F6E69993611D47DC8E7C /* SnapshotListenerSourceTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SnapshotListenerSourceTests.swift; sourceTree = ""; }; 4D9E51DA7A275D8B1CAEAEB2 /* listen_source_spec_test.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; path = listen_source_spec_test.json; sourceTree = ""; }; 4F5B96F3ABCD2CA901DB1CD4 /* bundle_builder.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = bundle_builder.cc; sourceTree = ""; }; + 51099E17746811AB659BB2B1 /* Pods-Firestore_Example_tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_tvOS.release.xcconfig"; path = "Target Support Files/Pods-Firestore_Example_tvOS/Pods-Firestore_Example_tvOS.release.xcconfig"; sourceTree = ""; }; 526D755F65AC676234F57125 /* target_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = target_test.cc; sourceTree = ""; }; 52756B7624904C36FBB56000 /* fake_target_metadata_provider.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = fake_target_metadata_provider.h; sourceTree = ""; }; 5342CDDB137B4E93E2E85CCA /* byte_string_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = byte_string_test.cc; path = nanopb/byte_string_test.cc; sourceTree = ""; }; @@ -1878,7 +1878,6 @@ 54EB764C202277B30088B8F3 /* array_sorted_map_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = array_sorted_map_test.cc; sourceTree = ""; }; 57F8EE51B5EFC9FAB185B66C /* Validation_BloomFilterTest_MD5_5000_01_bloom_filter_proto.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_5000_01_bloom_filter_proto.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_5000_01_bloom_filter_proto.json; sourceTree = ""; }; 584AE2C37A55B408541A6FF3 /* remote_event_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = remote_event_test.cc; sourceTree = ""; }; - 5918805E993304321A05E82B /* Pods_Firestore_Example_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Example_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5B5414D28802BC76FDADABD6 /* stream_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = stream_test.cc; sourceTree = ""; }; 5B96CC29E9946508F022859C /* Validation_BloomFilterTest_MD5_50000_0001_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_50000_0001_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_50000_0001_membership_test_result.json; sourceTree = ""; }; 5C68EE4CB94C0DD6E333F546 /* Validation_BloomFilterTest_MD5_1_01_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_1_01_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_1_01_membership_test_result.json; sourceTree = ""; }; @@ -1923,15 +1922,12 @@ 61F72C5520BC48FD001A68CB /* serializer_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = serializer_test.cc; sourceTree = ""; }; 620C1427763BA5D3CCFB5A1F /* BridgingHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = BridgingHeader.h; sourceTree = ""; }; 621D620928F9CE7400D2FA26 /* QueryIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QueryIntegrationTests.swift; sourceTree = ""; }; - 62E103B28B48A81D682A0DE9 /* Pods_Firestore_Example_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Example_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 62E54B832A9E910A003347C8 /* IndexingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IndexingTests.swift; sourceTree = ""; }; 63136A2371C0C013EC7A540C /* target_index_matcher_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = target_index_matcher_test.cc; sourceTree = ""; }; 64AA92CFA356A2360F3C5646 /* filesystem_testing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = filesystem_testing.h; sourceTree = ""; }; 65AF0AB593C3AD81A1F1A57E /* FIRCompositeIndexQueryTests.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRCompositeIndexQueryTests.mm; sourceTree = ""; }; 67786C62C76A740AEDBD8CD3 /* FSTTestingHooks.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = FSTTestingHooks.h; sourceTree = ""; }; - 69E6C311558EC77729A16CF1 /* Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.debug.xcconfig"; sourceTree = ""; }; 6A7A30A2DB3367E08939E789 /* bloom_filter.pb.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = bloom_filter.pb.h; sourceTree = ""; }; - 6AE927CDFC7A72BF825BE4CB /* Pods-Firestore_Tests_tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Tests_tvOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Tests_tvOS/Pods-Firestore_Tests_tvOS.release.xcconfig"; sourceTree = ""; }; 6E8302DE210222ED003E1EA3 /* FSTFuzzTestFieldPath.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FSTFuzzTestFieldPath.h; sourceTree = ""; }; 6E8302DF21022309003E1EA3 /* FSTFuzzTestFieldPath.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTFuzzTestFieldPath.mm; sourceTree = ""; }; 6EA39FDD20FE820E008D461F /* FSTFuzzTestSerializer.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTFuzzTestSerializer.mm; sourceTree = ""; }; @@ -1947,13 +1943,14 @@ 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 728F617782600536F2561463 /* Validation_BloomFilterTest_MD5_5000_0001_bloom_filter_proto.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_5000_0001_bloom_filter_proto.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_5000_0001_bloom_filter_proto.json; sourceTree = ""; }; 731541602214AFFA0037F4DC /* query_spec_test.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = query_spec_test.json; sourceTree = ""; }; + 7351D03F69C7394EB9BB4686 /* Pods-Firestore_Tests_macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Tests_macOS.release.xcconfig"; path = "Target Support Files/Pods-Firestore_Tests_macOS/Pods-Firestore_Tests_macOS.release.xcconfig"; sourceTree = ""; }; 73866A9F2082B069009BB4FF /* FIRArrayTransformTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRArrayTransformTests.mm; sourceTree = ""; }; 73F1F73A2210F3D800E1F692 /* index_manager_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = index_manager_test.h; sourceTree = ""; }; - 74AC2ADBF1BAD9A8EF30CF41 /* Pods-Firestore_IntegrationTests_tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_IntegrationTests_tvOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_IntegrationTests_tvOS/Pods-Firestore_IntegrationTests_tvOS.debug.xcconfig"; sourceTree = ""; }; 74FBEFA4FE4B12C435011763 /* memory_mutation_queue_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = memory_mutation_queue_test.cc; sourceTree = ""; }; 7515B47C92ABEEC66864B55C /* field_transform_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = field_transform_test.cc; sourceTree = ""; }; + 75532670EC61672D0CF0D743 /* Pods_Firestore_Example_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Example_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 75860CD13AF47EB1EA39EC2F /* leveldb_opener_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = leveldb_opener_test.cc; sourceTree = ""; }; - 759E964B6A03E6775C992710 /* Pods_Firestore_Tests_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Tests_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 75CE2CE4AE4EB4DF1EABF67C /* Pods-Firestore_Benchmarks_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Benchmarks_iOS.debug.xcconfig"; path = "Target Support Files/Pods-Firestore_Benchmarks_iOS/Pods-Firestore_Benchmarks_iOS.debug.xcconfig"; sourceTree = ""; }; 75E24C5CD7BC423D48713100 /* counting_query_engine.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = counting_query_engine.h; sourceTree = ""; }; 7628664347B9C96462D4BF17 /* byte_stream_apple_test.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = byte_stream_apple_test.mm; sourceTree = ""; }; 776530F066E788C355B78457 /* FIRBundlesTests.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRBundlesTests.mm; sourceTree = ""; }; @@ -1962,13 +1959,15 @@ 795AA8FC31D2AF6864B07D39 /* FIRIndexingTests.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRIndexingTests.mm; sourceTree = ""; }; 79D4CD6A707ED3F7A6D2ECF5 /* view_testing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = view_testing.h; sourceTree = ""; }; 79EAA9F7B1B9592B5F053923 /* bundle_spec_test.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; path = bundle_spec_test.json; sourceTree = ""; }; + 7AF095C33956262DE72A79C7 /* Pods_Firestore_IntegrationTests_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_IntegrationTests_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7B44DD11682C4803B73DCC34 /* Validation_BloomFilterTest_MD5_50000_01_bloom_filter_proto.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_50000_01_bloom_filter_proto.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_50000_01_bloom_filter_proto.json; sourceTree = ""; }; 7B65C996438B84DBC7616640 /* CodableTimestampTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CodableTimestampTests.swift; sourceTree = ""; }; 7C3F995E040E9E9C5E8514BB /* query_listener_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = query_listener_test.cc; sourceTree = ""; }; 7C5C40C7BFBB86032F1DC632 /* FSTExceptionCatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = FSTExceptionCatcher.h; sourceTree = ""; }; + 7E8F974DD55E6FEC2304041A /* Pods-Firestore_Example_tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_tvOS.debug.xcconfig"; path = "Target Support Files/Pods-Firestore_Example_tvOS/Pods-Firestore_Example_tvOS.debug.xcconfig"; sourceTree = ""; }; 7EB299CF85034F09CFD6F3FD /* remote_document_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = remote_document_cache_test.cc; sourceTree = ""; }; + 7FFB36B28E8515DEF5979A57 /* Pods-Firestore_FuzzTests_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_FuzzTests_iOS.debug.xcconfig"; path = "Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS.debug.xcconfig"; sourceTree = ""; }; 84076EADF6872C78CDAC7291 /* bundle_builder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = bundle_builder.h; sourceTree = ""; }; - 84434E57CA72951015FC71BC /* Pods-Firestore_FuzzTests_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_FuzzTests_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS.debug.xcconfig"; sourceTree = ""; }; 872C92ABD71B12784A1C5520 /* async_testing.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = async_testing.cc; sourceTree = ""; }; 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 87553338E42B8ECA05BA987E /* grpc_stream_tester.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = grpc_stream_tester.cc; sourceTree = ""; }; @@ -1984,17 +1983,17 @@ 8E9CD82E60893DDD7757B798 /* leveldb_bundle_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = leveldb_bundle_cache_test.cc; sourceTree = ""; }; 8EF6A33BC2D84233C355F1D0 /* memory_query_engine_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = memory_query_engine_test.cc; sourceTree = ""; }; 8F1A7B4158D9DD76EE4836BF /* load_bundle_task_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = load_bundle_task_test.cc; path = api/load_bundle_task_test.cc; sourceTree = ""; }; + 8F598CD89DBDF6EE959C7F82 /* Pods_Firestore_Benchmarks_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Benchmarks_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8FA60B08D59FEA0D6751E87F /* empty_credentials_provider_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = empty_credentials_provider_test.cc; path = credentials/empty_credentials_provider_test.cc; sourceTree = ""; }; 9098A0C535096F2EE9C35DE0 /* create_noop_connectivity_monitor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = create_noop_connectivity_monitor.h; sourceTree = ""; }; 9113B6F513D0473AEABBAF1F /* persistence_testing.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = persistence_testing.cc; sourceTree = ""; }; 9765D47FA12FA283F4EFAD02 /* memory_lru_garbage_collector_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = memory_lru_garbage_collector_test.cc; sourceTree = ""; }; - 97C492D2524E92927C11F425 /* Pods-Firestore_FuzzTests_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_FuzzTests_iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS.release.xcconfig"; sourceTree = ""; }; - 98366480BD1FD44A1FEDD982 /* Pods-Firestore_Example_macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_macOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_macOS/Pods-Firestore_Example_macOS.debug.xcconfig"; sourceTree = ""; }; 99434327614FEFF7F7DC88EC /* counting_query_engine.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = counting_query_engine.cc; sourceTree = ""; }; 9B0B005A79E765AF02793DCE /* schedule_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = schedule_test.cc; sourceTree = ""; }; 9C1AFCC9E616EC33D6E169CF /* recovery_spec_test.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; path = recovery_spec_test.json; sourceTree = ""; }; 9CFD366B783AE27B9E79EE7A /* string_format_apple_test.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = string_format_apple_test.mm; sourceTree = ""; }; 9E60C06991E3D28A0F70DD8D /* globals_cache_test.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = globals_cache_test.h; sourceTree = ""; }; + 9EBB74B6DEFFC6EB5F7B7216 /* Pods-Firestore_Example_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_iOS.debug.xcconfig"; path = "Target Support Files/Pods-Firestore_Example_iOS/Pods-Firestore_Example_iOS.debug.xcconfig"; sourceTree = ""; }; A002425BC4FC4E805F4175B6 /* testing_hooks_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = testing_hooks_test.cc; sourceTree = ""; }; A082AFDD981B07B5AD78FDE8 /* token_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = token_test.cc; path = credentials/token_test.cc; sourceTree = ""; }; A20BAA3D2F994384279727EC /* md5_testing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = md5_testing.h; sourceTree = ""; }; @@ -2002,8 +2001,6 @@ A366F6AE1A5A77548485C091 /* bundle.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = bundle.pb.cc; sourceTree = ""; }; A5466E7809AD2871FFDE6C76 /* view_testing.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = view_testing.cc; sourceTree = ""; }; A5D9044B72061CAF284BC9E4 /* Validation_BloomFilterTest_MD5_50000_0001_bloom_filter_proto.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_50000_0001_bloom_filter_proto.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_50000_0001_bloom_filter_proto.json; sourceTree = ""; }; - A5FA86650A18F3B7A8162287 /* Pods-Firestore_Benchmarks_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Benchmarks_iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Benchmarks_iOS/Pods-Firestore_Benchmarks_iOS.release.xcconfig"; sourceTree = ""; }; - A70E82DD627B162BEF92B8ED /* Pods-Firestore_Example_tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_tvOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_tvOS/Pods-Firestore_Example_tvOS.debug.xcconfig"; sourceTree = ""; }; A853C81A6A5A51C9D0389EDA /* bundle_loader_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = bundle_loader_test.cc; path = bundle/bundle_loader_test.cc; sourceTree = ""; }; AAED89D7690E194EF3BA1132 /* garbage_collection_spec_test.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; path = garbage_collection_spec_test.json; sourceTree = ""; }; AB323F9553050F4F6490F9FF /* pretty_printing_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = pretty_printing_test.cc; path = nanopb/pretty_printing_test.cc; sourceTree = ""; }; @@ -2018,13 +2015,14 @@ AB7BAB332012B519001E0872 /* geo_point_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = geo_point_test.cc; sourceTree = ""; }; ABA495B9202B7E79008A7851 /* snapshot_version_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = snapshot_version_test.cc; sourceTree = ""; }; ABF6506B201131F8005F2C74 /* timestamp_test.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = timestamp_test.cc; sourceTree = ""; }; + ADA2ED29D96713D40F9458D2 /* Pods-Firestore_IntegrationTests_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_IntegrationTests_iOS.release.xcconfig"; path = "Target Support Files/Pods-Firestore_IntegrationTests_iOS/Pods-Firestore_IntegrationTests_iOS.release.xcconfig"; sourceTree = ""; }; AE4A9E38D65688EE000EE2A1 /* index_manager_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = index_manager_test.cc; sourceTree = ""; }; AE89CFF09C6804573841397F /* leveldb_document_overlay_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = leveldb_document_overlay_cache_test.cc; sourceTree = ""; }; AF924C79F49F793992A84879 /* aggregate_query_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = aggregate_query_test.cc; path = api/aggregate_query_test.cc; sourceTree = ""; }; B0520A41251254B3C24024A3 /* Validation_BloomFilterTest_MD5_5000_01_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_5000_01_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_5000_01_membership_test_result.json; sourceTree = ""; }; - B3F5B3AAE791A5911B9EAA82 /* Pods-Firestore_Tests_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Tests_iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Tests_iOS/Pods-Firestore_Tests_iOS.release.xcconfig"; sourceTree = ""; }; B5C2A94EE24E60543F62CC35 /* bundle_serializer_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = bundle_serializer_test.cc; path = bundle/bundle_serializer_test.cc; sourceTree = ""; }; B5C37696557C81A6C2B7271A /* target_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = target_cache_test.cc; sourceTree = ""; }; + B5D51EE6CB59DA673474E285 /* Pods-Firestore_Example_macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_macOS.release.xcconfig"; path = "Target Support Files/Pods-Firestore_Example_macOS/Pods-Firestore_Example_macOS.release.xcconfig"; sourceTree = ""; }; B6152AD5202A5385000E5744 /* document_key_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = document_key_test.cc; sourceTree = ""; }; B629525F7A1AAC1AB765C74F /* leveldb_lru_garbage_collector_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = leveldb_lru_garbage_collector_test.cc; sourceTree = ""; }; B686F2AD2023DDB20028D6BE /* field_path_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = field_path_test.cc; sourceTree = ""; }; @@ -2046,24 +2044,26 @@ B6FB4688208F9B9100554BA2 /* executor_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = executor_test.cc; sourceTree = ""; }; B6FB4689208F9B9100554BA2 /* executor_libdispatch_test.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = executor_libdispatch_test.mm; sourceTree = ""; }; B6FB468A208F9B9100554BA2 /* executor_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = executor_test.h; sourceTree = ""; }; - B79CA87A1A01FC5329031C9B /* Pods_Firestore_FuzzTests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_FuzzTests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B73A76105FCE98FF8B521BA2 /* Pods-Firestore_Tests_tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Tests_tvOS.debug.xcconfig"; path = "Target Support Files/Pods-Firestore_Tests_tvOS/Pods-Firestore_Tests_tvOS.debug.xcconfig"; sourceTree = ""; }; B8A853940305237AFDA8050B /* query_engine_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = query_engine_test.cc; sourceTree = ""; }; B8BFD9B37D1029D238BDD71E /* FSTExceptionCatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = FSTExceptionCatcher.m; sourceTree = ""; }; - B953604968FBF5483BD20F5A /* Pods-Firestore_IntegrationTests_macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_IntegrationTests_macOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_IntegrationTests_macOS/Pods-Firestore_IntegrationTests_macOS.release.xcconfig"; sourceTree = ""; }; B9C261C26C5D311E1E3C0CB9 /* query_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = query_test.cc; sourceTree = ""; }; B9ED38DA914BDCD2E3A0714D /* aggregation_result.pb.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = aggregation_result.pb.h; sourceTree = ""; }; BA02DA2FCD0001CFC6EB08DA /* filesystem_testing.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = filesystem_testing.cc; sourceTree = ""; }; BA4CBA48204C9E25B56993BC /* fields_array_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = fields_array_test.cc; path = nanopb/fields_array_test.cc; sourceTree = ""; }; - BB92EB03E3F92485023F64ED /* Pods_Firestore_Example_iOS_Firestore_SwiftTests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Example_iOS_Firestore_SwiftTests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + BAAC6F56A47F795224077898 /* Pods_Firestore_Tests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Tests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + BB95B218544909D43949AEF1 /* Pods-Firestore_Tests_macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Tests_macOS.debug.xcconfig"; path = "Target Support Files/Pods-Firestore_Tests_macOS/Pods-Firestore_Tests_macOS.debug.xcconfig"; sourceTree = ""; }; BC3C788D290A935C353CEAA1 /* writer_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = writer_test.cc; path = nanopb/writer_test.cc; sourceTree = ""; }; - BD01F0E43E4E2A07B8B05099 /* Pods-Firestore_Tests_macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Tests_macOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Tests_macOS/Pods-Firestore_Tests_macOS.debug.xcconfig"; sourceTree = ""; }; + BC9433772EB08A5BA12437D0 /* Pods-Firestore_IntegrationTests_macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_IntegrationTests_macOS.release.xcconfig"; path = "Target Support Files/Pods-Firestore_IntegrationTests_macOS/Pods-Firestore_IntegrationTests_macOS.release.xcconfig"; sourceTree = ""; }; BF76A8DA34B5B67B4DD74666 /* field_index_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = field_index_test.cc; sourceTree = ""; }; C0C7C8977C94F9F9AFA4DB00 /* local_store_test.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = local_store_test.h; sourceTree = ""; }; C7429071B33BDF80A7FA2F8A /* view_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = view_test.cc; sourceTree = ""; }; C8522DE226C467C54E6788D8 /* mutation_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = mutation_test.cc; sourceTree = ""; }; C8582DFD74E8060C7072104B /* Validation_BloomFilterTest_MD5_5000_0001_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_5000_0001_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_5000_0001_membership_test_result.json; sourceTree = ""; }; + C8BF18CE315969DD8049CDDD /* Pods_Firestore_FuzzTests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_FuzzTests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C8FB22BCB9F454DA44BA80C8 /* Validation_BloomFilterTest_MD5_50000_01_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_50000_01_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_50000_01_membership_test_result.json; sourceTree = ""; }; C939D1789E38C09F9A0C1157 /* Validation_BloomFilterTest_MD5_1_0001_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_1_0001_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_1_0001_membership_test_result.json; sourceTree = ""; }; + CA1F95E982119E42FE1B0940 /* Pods-Firestore_IntegrationTests_tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_IntegrationTests_tvOS.release.xcconfig"; path = "Target Support Files/Pods-Firestore_IntegrationTests_tvOS/Pods-Firestore_IntegrationTests_tvOS.release.xcconfig"; sourceTree = ""; }; CB7B2D4691C380DE3EB59038 /* lru_garbage_collector_test.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = lru_garbage_collector_test.h; sourceTree = ""; }; CC572A9168BBEF7B83E4BBC5 /* view_snapshot_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = view_snapshot_test.cc; sourceTree = ""; }; CCC9BD953F121B9E29F9AA42 /* user_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = user_test.cc; path = credentials/user_test.cc; sourceTree = ""; }; @@ -2074,9 +2074,9 @@ D0A6E9136804A41CEC9D55D4 /* delayed_constructor_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = delayed_constructor_test.cc; sourceTree = ""; }; D22D4C211AC32E4F8B4883DA /* Validation_BloomFilterTest_MD5_500_0001_bloom_filter_proto.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_500_0001_bloom_filter_proto.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_500_0001_bloom_filter_proto.json; sourceTree = ""; }; D3CC3DC5338DCAF43A211155 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; + D45D358946A505F3AE6EFD42 /* Pods-Firestore_Example_macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_macOS.debug.xcconfig"; path = "Target Support Files/Pods-Firestore_Example_macOS/Pods-Firestore_Example_macOS.debug.xcconfig"; sourceTree = ""; }; D5B2593BCB52957D62F1C9D3 /* perf_spec_test.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = perf_spec_test.json; sourceTree = ""; }; D5B25E7E7D6873CBA4571841 /* FIRNumericTransformTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRNumericTransformTests.mm; sourceTree = ""; }; - D7DF4A6F740086A2D8C0E28E /* Pods_Firestore_Tests_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Tests_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D85AC18C55650ED230A71B82 /* FSTTestingHooks.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTTestingHooks.mm; sourceTree = ""; }; D872D754B8AD88E28AF28B28 /* aggregation_result.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = aggregation_result.pb.cc; sourceTree = ""; }; D8A6D52723B1BABE1B7B8D8F /* leveldb_overlay_migration_manager_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = leveldb_overlay_migration_manager_test.cc; sourceTree = ""; }; @@ -2092,6 +2092,7 @@ DAFF0D0221E64AC40062958F /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; }; DB1F1E1B1ED15E8D042144B1 /* leveldb_query_engine_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = leveldb_query_engine_test.cc; sourceTree = ""; }; DB5A1E760451189DA36028B3 /* memory_index_manager_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = memory_index_manager_test.cc; sourceTree = ""; }; + DBE307380F90541FBDEC17C6 /* Pods_Firestore_IntegrationTests_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_IntegrationTests_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DD12BC1DB2480886D2FB0005 /* settings_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = settings_test.cc; path = api/settings_test.cc; sourceTree = ""; }; DD990FD89C165F4064B4F608 /* Validation_BloomFilterTest_MD5_500_01_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_500_01_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_500_01_membership_test_result.json; sourceTree = ""; }; DE03B2E91F2149D600A30B9C /* Firestore_IntegrationTests_iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Firestore_IntegrationTests_iOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -2101,15 +2102,14 @@ DE51B1981F0D48AC0013853F /* FSTSpecTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FSTSpecTests.h; sourceTree = ""; }; DE51B19A1F0D48AC0013853F /* FSTSyncEngineTestDriver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FSTSyncEngineTestDriver.h; sourceTree = ""; }; DE51B1A71F0D48AC0013853F /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - DF148C0D5EEC4A2CD9FA484C /* Pods-Firestore_Example_macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_macOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_macOS/Pods-Firestore_Example_macOS.release.xcconfig"; sourceTree = ""; }; DF445D5201750281F1817387 /* document_overlay_cache_test.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = document_overlay_cache_test.h; sourceTree = ""; }; E1459FA70B8FC18DE4B80D0D /* overlay_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = overlay_test.cc; sourceTree = ""; }; E2E39422953DE1D3C7B97E77 /* md5_testing.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = md5_testing.cc; sourceTree = ""; }; + E3137731321DAE1D1C350B76 /* Pods-Firestore_Tests_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Tests_iOS.release.xcconfig"; path = "Target Support Files/Pods-Firestore_Tests_iOS/Pods-Firestore_Tests_iOS.release.xcconfig"; sourceTree = ""; }; E3228F51DCDC2E90D5C58F97 /* ConditionalConformanceTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ConditionalConformanceTests.swift; sourceTree = ""; }; - E42355285B9EF55ABD785792 /* Pods_Firestore_Example_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Example_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E592181BFD7C53C305123739 /* Pods-Firestore_Tests_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Tests_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Tests_iOS/Pods-Firestore_Tests_iOS.debug.xcconfig"; sourceTree = ""; }; + E45E42A61CEEF275BCC8FDA3 /* Pods-Firestore_IntegrationTests_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_IntegrationTests_iOS.debug.xcconfig"; path = "Target Support Files/Pods-Firestore_IntegrationTests_iOS/Pods-Firestore_IntegrationTests_iOS.debug.xcconfig"; sourceTree = ""; }; E76F0CDF28E5FA62D21DE648 /* leveldb_target_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = leveldb_target_cache_test.cc; sourceTree = ""; }; - ECEBABC7E7B693BE808A1052 /* Pods_Firestore_IntegrationTests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_IntegrationTests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EAD912989F4FACF7A504E5B4 /* Pods-Firestore_Benchmarks_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Benchmarks_iOS.release.xcconfig"; path = "Target Support Files/Pods-Firestore_Benchmarks_iOS/Pods-Firestore_Benchmarks_iOS.release.xcconfig"; sourceTree = ""; }; EF3A65472C66B9560041EE69 /* FIRVectorValueTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRVectorValueTests.mm; sourceTree = ""; }; EF6C285029E462A200A7D4F1 /* FIRAggregateTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRAggregateTests.mm; sourceTree = ""; }; EF6C286C29E6D22200A7D4F1 /* AggregationIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AggregationIntegrationTests.swift; sourceTree = ""; }; @@ -2117,17 +2117,14 @@ EFF22EA92C5060A4009A369B /* VectorIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VectorIntegrationTests.swift; sourceTree = ""; }; F02F734F272C3C70D1307076 /* filter_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = filter_test.cc; sourceTree = ""; }; F119BDDF2F06B3C0883B8297 /* firebase_app_check_credentials_provider_test.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = firebase_app_check_credentials_provider_test.mm; path = credentials/firebase_app_check_credentials_provider_test.mm; sourceTree = ""; }; - F354C0FE92645B56A6C6FD44 /* Pods-Firestore_IntegrationTests_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_IntegrationTests_iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_IntegrationTests_iOS/Pods-Firestore_IntegrationTests_iOS.release.xcconfig"; sourceTree = ""; }; + F283BE60A757EDB3E63F7319 /* Pods-Firestore_Tests_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Tests_iOS.debug.xcconfig"; path = "Target Support Files/Pods-Firestore_Tests_iOS/Pods-Firestore_Tests_iOS.debug.xcconfig"; sourceTree = ""; }; F51859B394D01C0C507282F1 /* filesystem_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = filesystem_test.cc; sourceTree = ""; }; - F694C3CE4B77B3C0FA4BBA53 /* Pods_Firestore_Benchmarks_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Benchmarks_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F6CA0C5638AB6627CB5B4CF4 /* memory_local_store_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = memory_local_store_test.cc; sourceTree = ""; }; F7FC06E0A47D393DE1759AE1 /* bundle_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = bundle_cache_test.cc; sourceTree = ""; }; F8043813A5D16963EC02B182 /* local_serializer_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = local_serializer_test.cc; sourceTree = ""; }; F848C41C03A25C42AD5A4BC2 /* target_cache_test.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = target_cache_test.h; sourceTree = ""; }; F869D85E900E5AF6CD02E2FC /* firebase_auth_credentials_provider_test.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = firebase_auth_credentials_provider_test.mm; path = credentials/firebase_auth_credentials_provider_test.mm; sourceTree = ""; }; - FA2E9952BA2B299C1156C43C /* Pods-Firestore_Benchmarks_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Benchmarks_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Benchmarks_iOS/Pods-Firestore_Benchmarks_iOS.debug.xcconfig"; sourceTree = ""; }; FC44D934D4A52C790659C8D6 /* leveldb_globals_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; path = leveldb_globals_cache_test.cc; sourceTree = ""; }; - FC738525340E594EBFAB121E /* Pods-Firestore_Example_tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_tvOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_tvOS/Pods-Firestore_Example_tvOS.release.xcconfig"; sourceTree = ""; }; FF73B39D04D1760190E6B84A /* FIRQueryUnitTests.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRQueryUnitTests.mm; sourceTree = ""; }; FFCA39825D9678A03D1845D0 /* document_overlay_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = document_overlay_cache_test.cc; sourceTree = ""; }; /* End PBXFileReference section */ @@ -2137,7 +2134,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C21B3A1CCB3AD42E57EA14FC /* Pods_Firestore_Tests_macOS.framework in Frameworks */, + 015701EFFF559DE3B35BC5AE /* Pods_Firestore_Tests_macOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2145,7 +2142,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C1E35BCE2CFF9B56C28545A2 /* Pods_Firestore_Example_tvOS.framework in Frameworks */, + 85508B8C56FCCC391567D2FE /* Pods_Firestore_Example_tvOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2153,7 +2150,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4CC78CA0E9E03F5DCF13FEBD /* Pods_Firestore_Tests_tvOS.framework in Frameworks */, + 4C1C2BAA580E29B15E3E5C6B /* Pods_Firestore_Tests_tvOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2161,7 +2158,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 20A26E9D0336F7F32A098D05 /* Pods_Firestore_IntegrationTests_tvOS.framework in Frameworks */, + A15F2B65D767C12F6DD6AB9B /* Pods_Firestore_IntegrationTests_tvOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2169,7 +2166,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 358DBA8B2560C65D9EB23C35 /* Pods_Firestore_IntegrationTests_macOS.framework in Frameworks */, + F18612553F91C525D20F4A53 /* Pods_Firestore_IntegrationTests_macOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2177,7 +2174,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4AA4ABE36065DB79CD76DD8D /* Pods_Firestore_Benchmarks_iOS.framework in Frameworks */, + 88C8E23A88BDB3FDF7AB686B /* Pods_Firestore_Benchmarks_iOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2187,8 +2184,8 @@ files = ( 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, - C8D3CE2343E53223E6487F2C /* Pods_Firestore_Example_iOS.framework in Frameworks */, 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, + DFA186FE5BBFB484C2A60439 /* Pods_Firestore_Example_iOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2197,9 +2194,9 @@ buildActionMask = 2147483647; files = ( 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, - 5D405BE298CE4692CB00790A /* Pods_Firestore_Tests_iOS.framework in Frameworks */, 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, + 45CA70C602DD3DDAEF05DCAA /* Pods_Firestore_Tests_iOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2208,9 +2205,9 @@ buildActionMask = 2147483647; files = ( 6EDD3B4620BF247500C33877 /* Foundation.framework in Frameworks */, - C482E724F4B10968417C3F78 /* Pods_Firestore_FuzzTests_iOS.framework in Frameworks */, 6EDD3B4820BF247500C33877 /* UIKit.framework in Frameworks */, 6EDD3B4920BF247500C33877 /* XCTest.framework in Frameworks */, + 0E24350AA378A5A8D9927B9D /* Pods_Firestore_FuzzTests_iOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2218,7 +2215,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - DD213F68A6F79E1D4924BD95 /* Pods_Firestore_Example_macOS.framework in Frameworks */, + BDA770C3B110516CDC35164D /* Pods_Firestore_Example_macOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2227,9 +2224,9 @@ buildActionMask = 2147483647; files = ( DE03B2D61F2149D600A30B9C /* Foundation.framework in Frameworks */, - 8C82D4D3F9AB63E79CC52DC8 /* Pods_Firestore_IntegrationTests_iOS.framework in Frameworks */, DE03B2D51F2149D600A30B9C /* UIKit.framework in Frameworks */, DE03B2D41F2149D600A30B9C /* XCTest.framework in Frameworks */, + 8F59A2CC5A9E99BB2DEA7F91 /* Pods_Firestore_IntegrationTests_iOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2599,7 +2596,7 @@ 5CAE131A20FFFED600BE9A4A /* Benchmarks */, 6003F58C195388D20070C39A /* Frameworks */, 6003F58B195388D20070C39A /* Products */, - AAEA2A72CFD1FA5AD34462F7 /* Pods */, + CB1261A0AC51FABDB2D584E7 /* Pods */, ); sourceTree = ""; }; @@ -2626,20 +2623,19 @@ children = ( 6003F58F195388D20070C39A /* CoreGraphics.framework */, 6003F58D195388D20070C39A /* Foundation.framework */, - F694C3CE4B77B3C0FA4BBA53 /* Pods_Firestore_Benchmarks_iOS.framework */, - 5918805E993304321A05E82B /* Pods_Firestore_Example_iOS.framework */, - BB92EB03E3F92485023F64ED /* Pods_Firestore_Example_iOS_Firestore_SwiftTests_iOS.framework */, - E42355285B9EF55ABD785792 /* Pods_Firestore_Example_macOS.framework */, - 62E103B28B48A81D682A0DE9 /* Pods_Firestore_Example_tvOS.framework */, - B79CA87A1A01FC5329031C9B /* Pods_Firestore_FuzzTests_iOS.framework */, - ECEBABC7E7B693BE808A1052 /* Pods_Firestore_IntegrationTests_iOS.framework */, - 39B832380209CC5BAF93BC52 /* Pods_Firestore_IntegrationTests_macOS.framework */, - 2220F583583EFC28DE792ABE /* Pods_Firestore_IntegrationTests_tvOS.framework */, - 2B50B3A0DF77100EEE887891 /* Pods_Firestore_Tests_iOS.framework */, - 759E964B6A03E6775C992710 /* Pods_Firestore_Tests_macOS.framework */, - D7DF4A6F740086A2D8C0E28E /* Pods_Firestore_Tests_tvOS.framework */, 6003F591195388D20070C39A /* UIKit.framework */, 6003F5AF195388D20070C39A /* XCTest.framework */, + 8F598CD89DBDF6EE959C7F82 /* Pods_Firestore_Benchmarks_iOS.framework */, + 27A5406BD14580197A127B93 /* Pods_Firestore_Example_iOS.framework */, + 75532670EC61672D0CF0D743 /* Pods_Firestore_Example_macOS.framework */, + 28346A8BA0E120EF68190661 /* Pods_Firestore_Example_tvOS.framework */, + C8BF18CE315969DD8049CDDD /* Pods_Firestore_FuzzTests_iOS.framework */, + 2B96FB42852D4E66ABEFB057 /* Pods_Firestore_IntegrationTests_iOS.framework */, + 7AF095C33956262DE72A79C7 /* Pods_Firestore_IntegrationTests_macOS.framework */, + DBE307380F90541FBDEC17C6 /* Pods_Firestore_IntegrationTests_tvOS.framework */, + BAAC6F56A47F795224077898 /* Pods_Firestore_Tests_iOS.framework */, + 11DF548295F98F22C70127D8 /* Pods_Firestore_Tests_macOS.framework */, + 46E38E88A7A020F4E721E373 /* Pods_Firestore_Tests_tvOS.framework */, ); name = Frameworks; sourceTree = ""; @@ -2848,37 +2844,6 @@ name = mutation; sourceTree = ""; }; - AAEA2A72CFD1FA5AD34462F7 /* Pods */ = { - isa = PBXGroup; - children = ( - FA2E9952BA2B299C1156C43C /* Pods-Firestore_Benchmarks_iOS.debug.xcconfig */, - A5FA86650A18F3B7A8162287 /* Pods-Firestore_Benchmarks_iOS.release.xcconfig */, - 69E6C311558EC77729A16CF1 /* Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.debug.xcconfig */, - 11984BA0A99D7A7ABA5B0D90 /* Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.release.xcconfig */, - 3C81DE3772628FE297055662 /* Pods-Firestore_Example_iOS.debug.xcconfig */, - 3F0992A4B83C60841C52E960 /* Pods-Firestore_Example_iOS.release.xcconfig */, - 98366480BD1FD44A1FEDD982 /* Pods-Firestore_Example_macOS.debug.xcconfig */, - DF148C0D5EEC4A2CD9FA484C /* Pods-Firestore_Example_macOS.release.xcconfig */, - A70E82DD627B162BEF92B8ED /* Pods-Firestore_Example_tvOS.debug.xcconfig */, - FC738525340E594EBFAB121E /* Pods-Firestore_Example_tvOS.release.xcconfig */, - 84434E57CA72951015FC71BC /* Pods-Firestore_FuzzTests_iOS.debug.xcconfig */, - 97C492D2524E92927C11F425 /* Pods-Firestore_FuzzTests_iOS.release.xcconfig */, - 1277F98C20D2DF0867496976 /* Pods-Firestore_IntegrationTests_iOS.debug.xcconfig */, - F354C0FE92645B56A6C6FD44 /* Pods-Firestore_IntegrationTests_iOS.release.xcconfig */, - 2F901F31BC62444A476B779F /* Pods-Firestore_IntegrationTests_macOS.debug.xcconfig */, - B953604968FBF5483BD20F5A /* Pods-Firestore_IntegrationTests_macOS.release.xcconfig */, - 74AC2ADBF1BAD9A8EF30CF41 /* Pods-Firestore_IntegrationTests_tvOS.debug.xcconfig */, - 36D235D9F1240D5195CDB670 /* Pods-Firestore_IntegrationTests_tvOS.release.xcconfig */, - E592181BFD7C53C305123739 /* Pods-Firestore_Tests_iOS.debug.xcconfig */, - B3F5B3AAE791A5911B9EAA82 /* Pods-Firestore_Tests_iOS.release.xcconfig */, - BD01F0E43E4E2A07B8B05099 /* Pods-Firestore_Tests_macOS.debug.xcconfig */, - 397FB002E298B780F1E223E2 /* Pods-Firestore_Tests_macOS.release.xcconfig */, - 2E48431B0EDA400BEA91D4AB /* Pods-Firestore_Tests_tvOS.debug.xcconfig */, - 6AE927CDFC7A72BF825BE4CB /* Pods-Firestore_Tests_tvOS.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; AB356EF5200E9D1A0089B766 /* model */ = { isa = PBXGroup; children = ( @@ -2920,6 +2885,36 @@ path = core; sourceTree = ""; }; + CB1261A0AC51FABDB2D584E7 /* Pods */ = { + isa = PBXGroup; + children = ( + 75CE2CE4AE4EB4DF1EABF67C /* Pods-Firestore_Benchmarks_iOS.debug.xcconfig */, + EAD912989F4FACF7A504E5B4 /* Pods-Firestore_Benchmarks_iOS.release.xcconfig */, + 9EBB74B6DEFFC6EB5F7B7216 /* Pods-Firestore_Example_iOS.debug.xcconfig */, + 3E26017832D28D24F2E391C5 /* Pods-Firestore_Example_iOS.release.xcconfig */, + D45D358946A505F3AE6EFD42 /* Pods-Firestore_Example_macOS.debug.xcconfig */, + B5D51EE6CB59DA673474E285 /* Pods-Firestore_Example_macOS.release.xcconfig */, + 7E8F974DD55E6FEC2304041A /* Pods-Firestore_Example_tvOS.debug.xcconfig */, + 51099E17746811AB659BB2B1 /* Pods-Firestore_Example_tvOS.release.xcconfig */, + 7FFB36B28E8515DEF5979A57 /* Pods-Firestore_FuzzTests_iOS.debug.xcconfig */, + 2B60312099B9CFAE3040FAC1 /* Pods-Firestore_FuzzTests_iOS.release.xcconfig */, + E45E42A61CEEF275BCC8FDA3 /* Pods-Firestore_IntegrationTests_iOS.debug.xcconfig */, + ADA2ED29D96713D40F9458D2 /* Pods-Firestore_IntegrationTests_iOS.release.xcconfig */, + 161C4C78B78C56AAF4EBDF4E /* Pods-Firestore_IntegrationTests_macOS.debug.xcconfig */, + BC9433772EB08A5BA12437D0 /* Pods-Firestore_IntegrationTests_macOS.release.xcconfig */, + 3819FBEB244A6E23FB69B046 /* Pods-Firestore_IntegrationTests_tvOS.debug.xcconfig */, + CA1F95E982119E42FE1B0940 /* Pods-Firestore_IntegrationTests_tvOS.release.xcconfig */, + F283BE60A757EDB3E63F7319 /* Pods-Firestore_Tests_iOS.debug.xcconfig */, + E3137731321DAE1D1C350B76 /* Pods-Firestore_Tests_iOS.release.xcconfig */, + BB95B218544909D43949AEF1 /* Pods-Firestore_Tests_macOS.debug.xcconfig */, + 7351D03F69C7394EB9BB4686 /* Pods-Firestore_Tests_macOS.release.xcconfig */, + B73A76105FCE98FF8B521BA2 /* Pods-Firestore_Tests_tvOS.debug.xcconfig */, + 4A67C88EC98B1BBD4615BB12 /* Pods-Firestore_Tests_tvOS.release.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; DAFF0CF621E64AC30062958F /* macOS */ = { isa = PBXGroup; children = ( @@ -3078,11 +3073,11 @@ isa = PBXNativeTarget; buildConfigurationList = 544AB19B2248072200F851E6 /* Build configuration list for PBXNativeTarget "Firestore_Tests_macOS" */; buildPhases = ( - 30108B32BF2B385AECDB7FB2 /* [CP] Check Pods Manifest.lock */, + 7430C7693EFF880371CF529C /* [CP] Check Pods Manifest.lock */, 544AB18E2248072200F851E6 /* Sources */, 544AB18F2248072200F851E6 /* Frameworks */, 544AB1902248072200F851E6 /* Resources */, - 7E4A6E169B172874E17A3ECA /* [CP] Embed Pods Frameworks */, + E7BC98B772B2DF9CEDFF4B51 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -3098,11 +3093,11 @@ isa = PBXNativeTarget; buildConfigurationList = 54AA33A1224BF936006CE580 /* Build configuration list for PBXNativeTarget "Firestore_Example_tvOS" */; buildPhases = ( - 8748E45246D96175497949A5 /* [CP] Check Pods Manifest.lock */, + 0011C7F99914E1A067AB3270 /* [CP] Check Pods Manifest.lock */, 54AA338B224BF935006CE580 /* Sources */, 54AA338C224BF935006CE580 /* Frameworks */, 54AA338D224BF935006CE580 /* Resources */, - 264B3405701AA9DC9F07658B /* [CP] Embed Pods Frameworks */, + A6BB5749320B6D8AFA83251F /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -3117,11 +3112,11 @@ isa = PBXNativeTarget; buildConfigurationList = 54AA33AF224BFE0A006CE580 /* Build configuration list for PBXNativeTarget "Firestore_Tests_tvOS" */; buildPhases = ( - A4274FBF1C966A0513CBD0F6 /* [CP] Check Pods Manifest.lock */, + 0DB42C0172D4209C9257147F /* [CP] Check Pods Manifest.lock */, 54AA33A2224BFE09006CE580 /* Sources */, 54AA33A3224BFE09006CE580 /* Frameworks */, 54AA33A4224BFE09006CE580 /* Resources */, - 1B1BCDC6BB656D6B79D246DD /* [CP] Embed Pods Frameworks */, + 363141796CF323F7FD7F6E1B /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -3137,11 +3132,11 @@ isa = PBXNativeTarget; buildConfigurationList = 54AA33BB224C0035006CE580 /* Build configuration list for PBXNativeTarget "Firestore_IntegrationTests_tvOS" */; buildPhases = ( - 6800EBA4F597F7115445FCB5 /* [CP] Check Pods Manifest.lock */, + 5F2B4702BC2A6D81C3A70B55 /* [CP] Check Pods Manifest.lock */, 54AA33B0224C0035006CE580 /* Sources */, 54AA33B1224C0035006CE580 /* Frameworks */, 54AA33B2224C0035006CE580 /* Resources */, - 76368D74F155BC9491DC124E /* [CP] Embed Pods Frameworks */, + B58B105A0BF7EDEDCC22C440 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -3157,11 +3152,11 @@ isa = PBXNativeTarget; buildConfigurationList = 54B8E4B3224BDC4100930F18 /* Build configuration list for PBXNativeTarget "Firestore_IntegrationTests_macOS" */; buildPhases = ( - 54D4C01B433CAC3C4EEDB1F9 /* [CP] Check Pods Manifest.lock */, + DA980F4B2F1AA5CB06CA193B /* [CP] Check Pods Manifest.lock */, 54B8E4A6224BDC4100930F18 /* Sources */, 54B8E4A7224BDC4100930F18 /* Frameworks */, 54B8E4A8224BDC4100930F18 /* Resources */, - C164AD918C826AF88B418DA5 /* [CP] Embed Pods Frameworks */, + 41E68BD9A8C36B4157C1DDDB /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -3177,11 +3172,11 @@ isa = PBXNativeTarget; buildConfigurationList = 5CAE132020FFFED600BE9A4A /* Build configuration list for PBXNativeTarget "Firestore_Benchmarks_iOS" */; buildPhases = ( - BF6384844477A4F850F0E89F /* [CP] Check Pods Manifest.lock */, + C655916AE1178BE3430A74B2 /* [CP] Check Pods Manifest.lock */, 5CAE131520FFFED600BE9A4A /* Sources */, 5CAE131620FFFED600BE9A4A /* Frameworks */, 5CAE131720FFFED600BE9A4A /* Resources */, - 4C71ED5B5EF024AEF16B5E55 /* [CP] Embed Pods Frameworks */, + 18F458BB340A65C735B2F4B1 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -3197,11 +3192,11 @@ isa = PBXNativeTarget; buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "Firestore_Example_iOS" */; buildPhases = ( - 83F2AB95D08093BB076EE521 /* [CP] Check Pods Manifest.lock */, + 649E9C4C49138AF935C6318C /* [CP] Check Pods Manifest.lock */, 6003F586195388D20070C39A /* Sources */, 6003F587195388D20070C39A /* Frameworks */, 6003F588195388D20070C39A /* Resources */, - 1EE692C7509A98D7EB03CA51 /* [CP] Embed Pods Frameworks */, + 3C01011564A412162E78678E /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -3216,11 +3211,11 @@ isa = PBXNativeTarget; buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "Firestore_Tests_iOS" */; buildPhases = ( - 8B469EB6DA9E6404589402E2 /* [CP] Check Pods Manifest.lock */, + 07FC3A1410A287F24F825043 /* [CP] Check Pods Manifest.lock */, 6003F5AA195388D20070C39A /* Sources */, 6003F5AB195388D20070C39A /* Frameworks */, 6003F5AC195388D20070C39A /* Resources */, - 329C25E418360CEF62F6CB2B /* [CP] Embed Pods Frameworks */, + E923F1A5A984136D9300E79E /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -3236,12 +3231,12 @@ isa = PBXNativeTarget; buildConfigurationList = 6EDD3B5820BF247500C33877 /* Build configuration list for PBXNativeTarget "Firestore_FuzzTests_iOS" */; buildPhases = ( - 6EDD3AD420BF247500C33877 /* [CP] Check Pods Manifest.lock */, + F1ACE00EFBBC1AA2B35B6786 /* [CP] Check Pods Manifest.lock */, 6EDD3AD520BF247500C33877 /* Sources */, 6EDD3B4520BF247500C33877 /* Frameworks */, 6EDD3B4A20BF247500C33877 /* Resources */, - 6EDD3B5720BF247500C33877 /* [CP] Embed Pods Frameworks */, 6E622C7A20F52C8300B7E93A /* Run Script */, + 1345CA0887B1AA946D5C8C92 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -3257,11 +3252,11 @@ isa = PBXNativeTarget; buildConfigurationList = DAFF0D0521E64AC40062958F /* Build configuration list for PBXNativeTarget "Firestore_Example_macOS" */; buildPhases = ( - 7C2467DCD3E3E16FB0A737DE /* [CP] Check Pods Manifest.lock */, + 24E84CE0760FFD8AC267E1F3 /* [CP] Check Pods Manifest.lock */, DAFF0CF121E64AC30062958F /* Sources */, DAFF0CF221E64AC30062958F /* Frameworks */, DAFF0CF321E64AC30062958F /* Resources */, - 6A86E48DF663B6AA1CB5BA83 /* [CP] Embed Pods Frameworks */, + FC4E7F5CA17591E72DC7E895 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -3276,11 +3271,11 @@ isa = PBXNativeTarget; buildConfigurationList = DE03B2E61F2149D600A30B9C /* Build configuration list for PBXNativeTarget "Firestore_IntegrationTests_iOS" */; buildPhases = ( - A827A009A65B69DC1B80EAD4 /* [CP] Check Pods Manifest.lock */, + 57644C138C0C3E0290890A37 /* [CP] Check Pods Manifest.lock */, DE03B2981F2149D600A30B9C /* Sources */, DE03B2D31F2149D600A30B9C /* Frameworks */, DE03B2D81F2149D600A30B9C /* Resources */, - B7923D95031DB0DA112AAE9B /* [CP] Embed Pods Frameworks */, + CD96BF3B2166A5CFB9342990 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -3731,52 +3726,51 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 1B1BCDC6BB656D6B79D246DD /* [CP] Embed Pods Frameworks */ = { + 0011C7F99914E1A067AB3270 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_Tests_tvOS/Pods-Firestore_Tests_tvOS-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 1EE692C7509A98D7EB03CA51 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( + inputFileListPaths = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Firestore_Example_tvOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_Example_iOS/Pods-Firestore_Example_iOS-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 264B3405701AA9DC9F07658B /* [CP] Embed Pods Frameworks */ = { + 07FC3A1410A287F24F825043 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Firestore_Tests_iOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_Example_tvOS/Pods-Firestore_Example_tvOS-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 30108B32BF2B385AECDB7FB2 /* [CP] Check Pods Manifest.lock */ = { + 0DB42C0172D4209C9257147F /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -3791,14 +3785,14 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Firestore_Tests_macOS-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Firestore_Tests_tvOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 329C25E418360CEF62F6CB2B /* [CP] Embed Pods Frameworks */ = { + 1345CA0887B1AA946D5C8C92 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -3810,10 +3804,10 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_Tests_iOS/Pods-Firestore_Tests_iOS-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 4C71ED5B5EF024AEF16B5E55 /* [CP] Embed Pods Frameworks */ = { + 18F458BB340A65C735B2F4B1 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -3828,7 +3822,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_Benchmarks_iOS/Pods-Firestore_Benchmarks_iOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 54D4C01B433CAC3C4EEDB1F9 /* [CP] Check Pods Manifest.lock */ = { + 24E84CE0760FFD8AC267E1F3 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -3843,36 +3837,29 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Firestore_IntegrationTests_macOS-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Firestore_Example_macOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 6800EBA4F597F7115445FCB5 /* [CP] Check Pods Manifest.lock */ = { + 363141796CF323F7FD7F6E1B /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( ); + name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Firestore_IntegrationTests_tvOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_Tests_tvOS/Pods-Firestore_Tests_tvOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 6A86E48DF663B6AA1CB5BA83 /* [CP] Embed Pods Frameworks */ = { + 3C01011564A412162E78678E /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -3884,93 +3871,130 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_Example_macOS/Pods-Firestore_Example_macOS-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_Example_iOS/Pods-Firestore_Example_iOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 6E622C7A20F52C8300B7E93A /* Run Script */ = { + 41E68BD9A8C36B4157C1DDDB /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; - buildActionMask = 12; + buildActionMask = 2147483647; files = ( ); inputPaths = ( - "$(SRCROOT)/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos", ); - name = "Run Script"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "$(TARGET_BUILD_DIR)/FuzzTestsCorpus", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh\""; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_IntegrationTests_macOS/Pods-Firestore_IntegrationTests_macOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 6EDD3AD420BF247500C33877 /* [CP] Check Pods Manifest.lock */ = { + 57644C138C0C3E0290890A37 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Firestore_FuzzTests_iOS-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Firestore_IntegrationTests_iOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 6EDD3B5720BF247500C33877 /* [CP] Embed Pods Frameworks */ = { + 5F2B4702BC2A6D81C3A70B55 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Firestore_IntegrationTests_tvOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 76368D74F155BC9491DC124E /* [CP] Embed Pods Frameworks */ = { + 649E9C4C49138AF935C6318C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Firestore_Example_iOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_IntegrationTests_tvOS/Pods-Firestore_IntegrationTests_tvOS-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 7C2467DCD3E3E16FB0A737DE /* [CP] Check Pods Manifest.lock */ = { + 6E622C7A20F52C8300B7E93A /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 12; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos", + ); + name = "Run Script"; + outputPaths = ( + "$(TARGET_BUILD_DIR)/FuzzTestsCorpus", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh\""; + showEnvVarsInLog = 0; + }; + 7430C7693EFF880371CF529C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Firestore_Example_macOS-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Firestore_Tests_macOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 7E4A6E169B172874E17A3ECA /* [CP] Embed Pods Frameworks */ = { + A6BB5749320B6D8AFA83251F /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -3982,28 +4006,25 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_Tests_macOS/Pods-Firestore_Tests_macOS-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_Example_tvOS/Pods-Firestore_Example_tvOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 83F2AB95D08093BB076EE521 /* [CP] Check Pods Manifest.lock */ = { + B58B105A0BF7EDEDCC22C440 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Firestore_Example_iOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_IntegrationTests_tvOS/Pods-Firestore_IntegrationTests_tvOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 8748E45246D96175497949A5 /* [CP] Check Pods Manifest.lock */ = { + C655916AE1178BE3430A74B2 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -4018,32 +4039,29 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Firestore_Example_tvOS-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Firestore_Benchmarks_iOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 8B469EB6DA9E6404589402E2 /* [CP] Check Pods Manifest.lock */ = { + CD96BF3B2166A5CFB9342990 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Firestore_Tests_iOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_IntegrationTests_iOS/Pods-Firestore_IntegrationTests_iOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - A4274FBF1C966A0513CBD0F6 /* [CP] Check Pods Manifest.lock */ = { + DA980F4B2F1AA5CB06CA193B /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -4058,32 +4076,29 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Firestore_Tests_tvOS-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Firestore_IntegrationTests_macOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - A827A009A65B69DC1B80EAD4 /* [CP] Check Pods Manifest.lock */ = { + E7BC98B772B2DF9CEDFF4B51 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Firestore_IntegrationTests_iOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_Tests_macOS/Pods-Firestore_Tests_macOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - B7923D95031DB0DA112AAE9B /* [CP] Embed Pods Frameworks */ = { + E923F1A5A984136D9300E79E /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -4095,28 +4110,32 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_IntegrationTests_iOS/Pods-Firestore_IntegrationTests_iOS-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_Tests_iOS/Pods-Firestore_Tests_iOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - BF6384844477A4F850F0E89F /* [CP] Check Pods Manifest.lock */ = { + F1ACE00EFBBC1AA2B35B6786 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Firestore_Benchmarks_iOS-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Firestore_FuzzTests_iOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - C164AD918C826AF88B418DA5 /* [CP] Embed Pods Frameworks */ = { + FC4E7F5CA17591E72DC7E895 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -4128,7 +4147,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_IntegrationTests_macOS/Pods-Firestore_IntegrationTests_macOS-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Firestore_Example_macOS/Pods-Firestore_Example_macOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -5642,7 +5661,7 @@ /* Begin XCBuildConfiguration section */ 544AB1992248072200F851E6 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BD01F0E43E4E2A07B8B05099 /* Pods-Firestore_Tests_macOS.debug.xcconfig */; + baseConfigurationReference = BB95B218544909D43949AEF1 /* Pods-Firestore_Tests_macOS.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; @@ -5666,7 +5685,7 @@ }; 544AB19A2248072200F851E6 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 397FB002E298B780F1E223E2 /* Pods-Firestore_Tests_macOS.release.xcconfig */; + baseConfigurationReference = 7351D03F69C7394EB9BB4686 /* Pods-Firestore_Tests_macOS.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; @@ -5692,7 +5711,7 @@ }; 54AA339F224BF936006CE580 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A70E82DD627B162BEF92B8ED /* Pods-Firestore_Example_tvOS.debug.xcconfig */; + baseConfigurationReference = 7E8F974DD55E6FEC2304041A /* Pods-Firestore_Example_tvOS.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; @@ -5715,7 +5734,7 @@ }; 54AA33A0224BF936006CE580 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FC738525340E594EBFAB121E /* Pods-Firestore_Example_tvOS.release.xcconfig */; + baseConfigurationReference = 51099E17746811AB659BB2B1 /* Pods-Firestore_Example_tvOS.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; @@ -5739,7 +5758,7 @@ }; 54AA33AD224BFE0A006CE580 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2E48431B0EDA400BEA91D4AB /* Pods-Firestore_Tests_tvOS.debug.xcconfig */; + baseConfigurationReference = B73A76105FCE98FF8B521BA2 /* Pods-Firestore_Tests_tvOS.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; @@ -5761,7 +5780,7 @@ }; 54AA33AE224BFE0A006CE580 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6AE927CDFC7A72BF825BE4CB /* Pods-Firestore_Tests_tvOS.release.xcconfig */; + baseConfigurationReference = 4A67C88EC98B1BBD4615BB12 /* Pods-Firestore_Tests_tvOS.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; @@ -5784,7 +5803,7 @@ }; 54AA33BC224C0035006CE580 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 74AC2ADBF1BAD9A8EF30CF41 /* Pods-Firestore_IntegrationTests_tvOS.debug.xcconfig */; + baseConfigurationReference = 3819FBEB244A6E23FB69B046 /* Pods-Firestore_IntegrationTests_tvOS.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; @@ -5806,7 +5825,7 @@ }; 54AA33BD224C0035006CE580 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 36D235D9F1240D5195CDB670 /* Pods-Firestore_IntegrationTests_tvOS.release.xcconfig */; + baseConfigurationReference = CA1F95E982119E42FE1B0940 /* Pods-Firestore_IntegrationTests_tvOS.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; @@ -5829,7 +5848,7 @@ }; 54B8E4B1224BDC4100930F18 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2F901F31BC62444A476B779F /* Pods-Firestore_IntegrationTests_macOS.debug.xcconfig */; + baseConfigurationReference = 161C4C78B78C56AAF4EBDF4E /* Pods-Firestore_IntegrationTests_macOS.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; @@ -5853,7 +5872,7 @@ }; 54B8E4B2224BDC4100930F18 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B953604968FBF5483BD20F5A /* Pods-Firestore_IntegrationTests_macOS.release.xcconfig */; + baseConfigurationReference = BC9433772EB08A5BA12437D0 /* Pods-Firestore_IntegrationTests_macOS.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; @@ -5878,7 +5897,7 @@ }; 5CAE132120FFFED600BE9A4A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FA2E9952BA2B299C1156C43C /* Pods-Firestore_Benchmarks_iOS.debug.xcconfig */; + baseConfigurationReference = 75CE2CE4AE4EB4DF1EABF67C /* Pods-Firestore_Benchmarks_iOS.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; DEVELOPMENT_TEAM = EQHXZ8M8AV; @@ -5892,7 +5911,7 @@ }; 5CAE132220FFFED600BE9A4A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A5FA86650A18F3B7A8162287 /* Pods-Firestore_Benchmarks_iOS.release.xcconfig */; + baseConfigurationReference = EAD912989F4FACF7A504E5B4 /* Pods-Firestore_Benchmarks_iOS.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; DEVELOPMENT_TEAM = EQHXZ8M8AV; @@ -6013,7 +6032,7 @@ }; 6003F5C0195388D20070C39A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3C81DE3772628FE297055662 /* Pods-Firestore_Example_iOS.debug.xcconfig */; + baseConfigurationReference = 9EBB74B6DEFFC6EB5F7B7216 /* Pods-Firestore_Example_iOS.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -6035,7 +6054,7 @@ }; 6003F5C1195388D20070C39A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3F0992A4B83C60841C52E960 /* Pods-Firestore_Example_iOS.release.xcconfig */; + baseConfigurationReference = 3E26017832D28D24F2E391C5 /* Pods-Firestore_Example_iOS.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -6057,7 +6076,7 @@ }; 6003F5C3195388D20070C39A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E592181BFD7C53C305123739 /* Pods-Firestore_Tests_iOS.debug.xcconfig */; + baseConfigurationReference = F283BE60A757EDB3E63F7319 /* Pods-Firestore_Tests_iOS.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; DEVELOPMENT_TEAM = EQHXZ8M8AV; @@ -6118,7 +6137,7 @@ }; 6003F5C4195388D20070C39A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B3F5B3AAE791A5911B9EAA82 /* Pods-Firestore_Tests_iOS.release.xcconfig */; + baseConfigurationReference = E3137731321DAE1D1C350B76 /* Pods-Firestore_Tests_iOS.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; DEVELOPMENT_TEAM = EQHXZ8M8AV; @@ -6179,7 +6198,7 @@ }; 6EDD3B5920BF247500C33877 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 84434E57CA72951015FC71BC /* Pods-Firestore_FuzzTests_iOS.debug.xcconfig */; + baseConfigurationReference = 7FFB36B28E8515DEF5979A57 /* Pods-Firestore_FuzzTests_iOS.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; DEVELOPMENT_TEAM = EQHXZ8M8AV; @@ -6194,7 +6213,7 @@ }; 6EDD3B5A20BF247500C33877 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 97C492D2524E92927C11F425 /* Pods-Firestore_FuzzTests_iOS.release.xcconfig */; + baseConfigurationReference = 2B60312099B9CFAE3040FAC1 /* Pods-Firestore_FuzzTests_iOS.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; DEVELOPMENT_TEAM = EQHXZ8M8AV; @@ -6209,7 +6228,7 @@ }; DAFF0D0321E64AC40062958F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 98366480BD1FD44A1FEDD982 /* Pods-Firestore_Example_macOS.debug.xcconfig */; + baseConfigurationReference = D45D358946A505F3AE6EFD42 /* Pods-Firestore_Example_macOS.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ANALYZER_NONNULL = YES; @@ -6246,7 +6265,7 @@ }; DAFF0D0421E64AC40062958F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DF148C0D5EEC4A2CD9FA484C /* Pods-Firestore_Example_macOS.release.xcconfig */; + baseConfigurationReference = B5D51EE6CB59DA673474E285 /* Pods-Firestore_Example_macOS.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ANALYZER_NONNULL = YES; @@ -6284,7 +6303,7 @@ }; DE03B2E71F2149D600A30B9C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1277F98C20D2DF0867496976 /* Pods-Firestore_IntegrationTests_iOS.debug.xcconfig */; + baseConfigurationReference = E45E42A61CEEF275BCC8FDA3 /* Pods-Firestore_IntegrationTests_iOS.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; DEVELOPMENT_TEAM = EQHXZ8M8AV; @@ -6309,7 +6328,7 @@ }; DE03B2E81F2149D600A30B9C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F354C0FE92645B56A6C6FD44 /* Pods-Firestore_IntegrationTests_iOS.release.xcconfig */; + baseConfigurationReference = ADA2ED29D96713D40F9458D2 /* Pods-Firestore_IntegrationTests_iOS.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; DEVELOPMENT_TEAM = EQHXZ8M8AV; diff --git a/Firestore/Source/API/FIRFirestore+Internal.h b/Firestore/Source/API/FIRFirestore+Internal.h index 5c5da4c525d..a2f32366985 100644 --- a/Firestore/Source/API/FIRFirestore+Internal.h +++ b/Firestore/Source/API/FIRFirestore+Internal.h @@ -79,8 +79,6 @@ NS_ASSUME_NONNULL_BEGIN - (const std::shared_ptr &)workerQueue; -@property(nonatomic, assign, readonly) std::shared_ptr wrapped; - @property(nonatomic, assign, readonly) const model::DatabaseId &databaseID; @property(nonatomic, strong, readonly) FSTUserDataReader *dataReader; diff --git a/Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h b/Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h index 8882c91eff1..0a74b2924aa 100644 --- a/Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h +++ b/Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h @@ -15,6 +15,7 @@ */ #import +#import #import "FIRListenerRegistration.h" @@ -30,6 +31,16 @@ @class FIRWriteBatch; @class FIRPersistentCacheIndexManager; +namespace firebase { +namespace firestore { +namespace api { +class Firestore; +} // namespace api +} // namespace firestore +} // namespace firebase + +namespace api = firebase::firestore::api; + NS_ASSUME_NONNULL_BEGIN /** @@ -91,6 +102,8 @@ NS_SWIFT_NAME(Firestore) */ + (instancetype)firestoreForDatabase:(NSString *)database NS_SWIFT_NAME(firestore(database:)); +@property(nonatomic, assign, readonly) std::shared_ptr wrapped; + /** * Custom settings used to configure this `Firestore` object. */ diff --git a/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift b/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift index e85ca9a9791..e820372faf1 100644 --- a/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift +++ b/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift @@ -115,4 +115,8 @@ public extension Firestore { } } } + + func pipeline() -> PipelineSource { + return PipelineSource(firebase.firestore.api.FirestorePipeline.pipeline(wrapped)) + } } diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift b/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift new file mode 100644 index 00000000000..b0ace402cce --- /dev/null +++ b/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift @@ -0,0 +1,14 @@ +// +// PipelineSource.swift +// Pods +// +// Created by Cheryl Lin on 2024-12-12. +// + +public class PipelineSource { + let cppPtr: firebase.firestore.api.PipelineSource + + public init(_ cppSource: firebase.firestore.api.PipelineSource) { + cppPtr = cppSource + } +} diff --git a/Firestore/core/swift/include/firestore_pipeline.h b/Firestore/core/swift/include/firestore_pipeline.h index 6695d6a1b5f..8aed5a6e815 100644 --- a/Firestore/core/swift/include/firestore_pipeline.h +++ b/Firestore/core/swift/include/firestore_pipeline.h @@ -15,7 +15,7 @@ class Firestore; class FirestorePipeline { public: - PipelineSource pipeline(std::shared_ptr firestore); + static PipelineSource pipeline(std::shared_ptr firestore); }; } // namespace api diff --git a/Package.swift b/Package.swift index 32c10389320..65a6c4bfb9a 100644 --- a/Package.swift +++ b/Package.swift @@ -1405,6 +1405,7 @@ func firebaseFirestoreCppTarget() -> Target { "FirebaseAppCheckInterop", "FirebaseCore", "leveldb", + "FirebaseFirestoreInternalWrapper", .product(name: "nanopb", package: "nanopb"), ], path: "Firestore/core/swift", From 6608bb892645dd6b045fc5cc11d88036c1bc880b Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Tue, 17 Dec 2024 16:20:33 -0500 Subject: [PATCH 15/30] add pipeline result --- Firestore/core/swift/include/pipeline.h | 12 ++++++ .../core/swift/include/pipeline_result.h | 39 +++++++++++++++++++ Firestore/core/swift/src/pipeline.cc | 6 ++- Firestore/core/swift/src/pipeline_result.cc | 24 ++++++++++++ Firestore/core/swift/src/pipeline_source.cc | 3 +- 5 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 Firestore/core/swift/include/pipeline_result.h create mode 100644 Firestore/core/swift/src/pipeline_result.cc diff --git a/Firestore/core/swift/include/pipeline.h b/Firestore/core/swift/include/pipeline.h index 4519d5371e1..85da6206c03 100644 --- a/Firestore/core/swift/include/pipeline.h +++ b/Firestore/core/swift/include/pipeline.h @@ -6,19 +6,31 @@ #define FIREBASE_PIPELINE_H #include +#include #include "stage.h" namespace firebase { namespace firestore { +namespace core { +template +class EventListener; +} // namespace core + namespace api { class Firestore; +class PipelineResult; + +using PipelineSnapshotListener = + std::unique_ptr>>; class Pipeline { public: Pipeline(std::shared_ptr firestore, Stage stage); + std::shared_ptr GetPipelineResult(); + private: std::shared_ptr firestore_; Stage stage_; diff --git a/Firestore/core/swift/include/pipeline_result.h b/Firestore/core/swift/include/pipeline_result.h new file mode 100644 index 00000000000..c71a4200622 --- /dev/null +++ b/Firestore/core/swift/include/pipeline_result.h @@ -0,0 +1,39 @@ +// +// Created by Cheryl Lin on 2024-12-16. +// + +#ifndef FIREBASE_PIPELINE_RESULT_H +#define FIREBASE_PIPELINE_RESULT_H + +#include +#include "Firestore/core/include/firebase/firestore/timestamp.h" + +namespace firebase { +namespace firestore { + +namespace api { + +class Firestore; +class DocumentReference; + +class PipelineResult { + public: + PipelineResult(std::shared_ptr firestore, + std::shared_ptr doc_ref_ptr, + Timestamp execution_time, + Timestamp update_time, + Timestamp create_time); + + private: + std::shared_ptr firestore_; + std::shared_ptr doc_ref_ptr_; + Timestamp execution_time_; + Timestamp update_time_; + Timestamp create_time_; +}; + +} // namespace api + +} // namespace firestore +} // namespace firebase +#endif // FIREBASE_PIPELINE_RESULT_H diff --git a/Firestore/core/swift/src/pipeline.cc b/Firestore/core/swift/src/pipeline.cc index 070cb635d3a..762888f2e1c 100644 --- a/Firestore/core/swift/src/pipeline.cc +++ b/Firestore/core/swift/src/pipeline.cc @@ -1,6 +1,6 @@ #include "Firestore/core/swift/include/pipeline.h" -#include #include "Firestore/core/src/api/firestore.h" +#include "Firestore/core/src/core/event_listener.h" namespace firebase { namespace firestore { @@ -11,6 +11,10 @@ Pipeline::Pipeline(std::shared_ptr firestore, Stage stage) : firestore_(firestore), stage_(stage) { } +std::shared_ptr Pipeline::GetPipelineResult() { + return {}; +} + } // namespace api } // namespace firestore diff --git a/Firestore/core/swift/src/pipeline_result.cc b/Firestore/core/swift/src/pipeline_result.cc new file mode 100644 index 00000000000..6640d29f310 --- /dev/null +++ b/Firestore/core/swift/src/pipeline_result.cc @@ -0,0 +1,24 @@ + +#include "Firestore/core/swift/include/pipeline_result.h" + +namespace firebase { +namespace firestore { + +namespace api { + +PipelineResult::PipelineResult(std::shared_ptr firestore, + std::shared_ptr doc_ref_ptr, + Timestamp execution_time, + Timestamp update_time, + Timestamp create_time) + : firestore_(firestore), + doc_ref_ptr_(doc_ref_ptr), + execution_time_(execution_time), + update_time_(update_time), + create_time_(create_time) { +} + +} // namespace api + +} // namespace firestore +} // namespace firebase \ No newline at end of file diff --git a/Firestore/core/swift/src/pipeline_source.cc b/Firestore/core/swift/src/pipeline_source.cc index 2157b001132..addec222b09 100644 --- a/Firestore/core/swift/src/pipeline_source.cc +++ b/Firestore/core/swift/src/pipeline_source.cc @@ -11,6 +11,7 @@ namespace api { PipelineSource::PipelineSource(std::shared_ptr firestore) : firestore_(firestore) { + std::cout << "PipelineSource constructs" << std::endl; } Pipeline PipelineSource::GetCollection(std::string collection_path) { @@ -20,4 +21,4 @@ Pipeline PipelineSource::GetCollection(std::string collection_path) { } // namespace api } // namespace firestore -} // namespace firebase \ No newline at end of file +} // namespace firebase From 9ced414bb000d6d75929498e44f0f82d6748c00e Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Wed, 1 Jan 2025 19:33:41 -0500 Subject: [PATCH 16/30] Add Pipeline Result --- .../Swift/Source/SwiftAPI/Pipeline.swift | 35 +++++++++++++++++++ .../Source/SwiftAPI/PipelineResult.swift | 14 ++++++++ .../Source/SwiftAPI/PipelineSource.swift | 5 +++ .../core/swift/include/FirebaseFirestoreCpp.h | 1 + Firestore/core/swift/include/pipeline.h | 9 ++++- .../core/swift/include/pipeline_result.h | 20 ++++++----- .../core/swift/include/pipeline_source.h | 2 +- Firestore/core/swift/src/pipeline.cc | 12 +++++-- Firestore/core/swift/src/pipeline_result.cc | 16 ++++++--- Firestore/core/swift/src/pipeline_source.cc | 2 +- Package.swift | 1 + 11 files changed, 97 insertions(+), 20 deletions(-) create mode 100644 Firestore/Swift/Source/SwiftAPI/Pipeline.swift create mode 100644 Firestore/Swift/Source/SwiftAPI/PipelineResult.swift diff --git a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift new file mode 100644 index 00000000000..552a7351cbf --- /dev/null +++ b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift @@ -0,0 +1,35 @@ +// +// Pipeline.swift +// Firebase +// +// Created by Cheryl Lin on 2024-12-18. +// + +@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) +public class Pipeline { + var cppPtr: firebase.firestore.api.Pipeline + + public init(_ cppSource: firebase.firestore.api.Pipeline) { + cppPtr = cppSource + } + + @discardableResult + public func GetPipelineResult() async throws -> PipelineResult { +// return try await withCheckedThrowingContinuation { continuation in +// +// let callback: ( +// firebase.firestore.api.PipelineResult, +// Bool +// ) -> Void = { result, isSucceed in +// if isSucceed { +// continuation.resume(returning: PipelineResult(result)) +// } else { +// continuation.resume(throwing: "ERROR!" as! Error) +// } +// } + + // cppPtr.fetchDataWithCppCallback(callback) + return PipelineResult(firebase.firestore.api.PipelineResult + .GetTestResult(cppPtr.GetFirestore())) + } +} diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift new file mode 100644 index 00000000000..535cc5bc3b4 --- /dev/null +++ b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift @@ -0,0 +1,14 @@ +// +// PipelineResult.swift +// Firebase +// +// Created by Cheryl Lin on 2024-12-18. +// + +public class PipelineResult { + let cppPtr: firebase.firestore.api.PipelineResult + + public init(_ cppSource: firebase.firestore.api.PipelineResult) { + cppPtr = cppSource + } +} diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift b/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift index b0ace402cce..98a2feaf32d 100644 --- a/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift +++ b/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift @@ -5,10 +5,15 @@ // Created by Cheryl Lin on 2024-12-12. // +@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) public class PipelineSource { let cppPtr: firebase.firestore.api.PipelineSource public init(_ cppSource: firebase.firestore.api.PipelineSource) { cppPtr = cppSource } + + public func GetCollection(_ path: String) -> Pipeline { + return Pipeline(cppPtr.GetCollection(std.string(path))) + } } diff --git a/Firestore/core/swift/include/FirebaseFirestoreCpp.h b/Firestore/core/swift/include/FirebaseFirestoreCpp.h index 7738009bda2..1ef6e1bcf64 100644 --- a/Firestore/core/swift/include/FirebaseFirestoreCpp.h +++ b/Firestore/core/swift/include/FirebaseFirestoreCpp.h @@ -20,6 +20,7 @@ #import "collection_stage.h" #import "firestore_pipeline.h" #import "pipeline.h" +#import "pipeline_result.h" #import "pipeline_source.h" #import "stage.h" #import "used_by_swift.h" diff --git a/Firestore/core/swift/include/pipeline.h b/Firestore/core/swift/include/pipeline.h index 85da6206c03..37aa39c0462 100644 --- a/Firestore/core/swift/include/pipeline.h +++ b/Firestore/core/swift/include/pipeline.h @@ -5,8 +5,10 @@ #ifndef FIREBASE_PIPELINE_H #define FIREBASE_PIPELINE_H +#include #include #include +#include "pipeline_result.h" #include "stage.h" namespace firebase { @@ -29,7 +31,12 @@ class Pipeline { public: Pipeline(std::shared_ptr firestore, Stage stage); - std::shared_ptr GetPipelineResult(); + void GetPipelineResult( + std::function callback) const; + + std::shared_ptr GetFirestore() const { + return firestore_; + } private: std::shared_ptr firestore_; diff --git a/Firestore/core/swift/include/pipeline_result.h b/Firestore/core/swift/include/pipeline_result.h index c71a4200622..5197ec0cc97 100644 --- a/Firestore/core/swift/include/pipeline_result.h +++ b/Firestore/core/swift/include/pipeline_result.h @@ -6,9 +6,11 @@ #define FIREBASE_PIPELINE_RESULT_H #include -#include "Firestore/core/include/firebase/firestore/timestamp.h" namespace firebase { + +class Timestamp; + namespace firestore { namespace api { @@ -19,17 +21,17 @@ class DocumentReference; class PipelineResult { public: PipelineResult(std::shared_ptr firestore, - std::shared_ptr doc_ref_ptr, - Timestamp execution_time, - Timestamp update_time, - Timestamp create_time); + std::shared_ptr execution_time, + std::shared_ptr update_time, + std::shared_ptr create_time); + + static PipelineResult GetTestResult(std::shared_ptr firestore); private: std::shared_ptr firestore_; - std::shared_ptr doc_ref_ptr_; - Timestamp execution_time_; - Timestamp update_time_; - Timestamp create_time_; + std::shared_ptr execution_time_; + std::shared_ptr update_time_; + std::shared_ptr create_time_; }; } // namespace api diff --git a/Firestore/core/swift/include/pipeline_source.h b/Firestore/core/swift/include/pipeline_source.h index a9d2d6f850a..5ad4c8b5bce 100644 --- a/Firestore/core/swift/include/pipeline_source.h +++ b/Firestore/core/swift/include/pipeline_source.h @@ -21,7 +21,7 @@ class PipelineSource { public: PipelineSource(std::shared_ptr firestore); - Pipeline GetCollection(std::string collection_path); + Pipeline GetCollection(std::string collection_path) const; private: std::shared_ptr firestore_; diff --git a/Firestore/core/swift/src/pipeline.cc b/Firestore/core/swift/src/pipeline.cc index 762888f2e1c..85b85b008ce 100644 --- a/Firestore/core/swift/src/pipeline.cc +++ b/Firestore/core/swift/src/pipeline.cc @@ -1,6 +1,8 @@ #include "Firestore/core/swift/include/pipeline.h" +#include "Firestore/core/include/firebase/firestore/timestamp.h" #include "Firestore/core/src/api/firestore.h" #include "Firestore/core/src/core/event_listener.h" +#include "Firestore/core/swift/include/pipeline_result.h" namespace firebase { namespace firestore { @@ -11,11 +13,15 @@ Pipeline::Pipeline(std::shared_ptr firestore, Stage stage) : firestore_(firestore), stage_(stage) { } -std::shared_ptr Pipeline::GetPipelineResult() { - return {}; +void Pipeline::GetPipelineResult( + std::function callback) const { + callback(PipelineResult(firestore_, std::make_shared(0, 0), + std::make_shared(0, 0), + std::make_shared(0, 0)), + true); } } // namespace api } // namespace firestore -} // namespace firebase \ No newline at end of file +} // namespace firebase diff --git a/Firestore/core/swift/src/pipeline_result.cc b/Firestore/core/swift/src/pipeline_result.cc index 6640d29f310..d337a0f1a6e 100644 --- a/Firestore/core/swift/src/pipeline_result.cc +++ b/Firestore/core/swift/src/pipeline_result.cc @@ -1,5 +1,6 @@ #include "Firestore/core/swift/include/pipeline_result.h" +#include "Firestore/core/include/firebase/firestore/timestamp.h" namespace firebase { namespace firestore { @@ -7,17 +8,22 @@ namespace firestore { namespace api { PipelineResult::PipelineResult(std::shared_ptr firestore, - std::shared_ptr doc_ref_ptr, - Timestamp execution_time, - Timestamp update_time, - Timestamp create_time) + std::shared_ptr execution_time, + std::shared_ptr update_time, + std::shared_ptr create_time) : firestore_(firestore), - doc_ref_ptr_(doc_ref_ptr), execution_time_(execution_time), update_time_(update_time), create_time_(create_time) { } +PipelineResult PipelineResult::GetTestResult( + std::shared_ptr firestore) { + return PipelineResult(firestore, std::make_shared(0, 0), + std::make_shared(0, 0), + std::make_shared(0, 0)); +} + } // namespace api } // namespace firestore diff --git a/Firestore/core/swift/src/pipeline_source.cc b/Firestore/core/swift/src/pipeline_source.cc index addec222b09..16bc58bf0f5 100644 --- a/Firestore/core/swift/src/pipeline_source.cc +++ b/Firestore/core/swift/src/pipeline_source.cc @@ -14,7 +14,7 @@ PipelineSource::PipelineSource(std::shared_ptr firestore) std::cout << "PipelineSource constructs" << std::endl; } -Pipeline PipelineSource::GetCollection(std::string collection_path) { +Pipeline PipelineSource::GetCollection(std::string collection_path) const { return {firestore_, Collection{collection_path}}; } diff --git a/Package.swift b/Package.swift index 65a6c4bfb9a..7adf39b27c5 100644 --- a/Package.swift +++ b/Package.swift @@ -1407,6 +1407,7 @@ func firebaseFirestoreCppTarget() -> Target { "leveldb", "FirebaseFirestoreInternalWrapper", .product(name: "nanopb", package: "nanopb"), + .product(name: "gRPC-cpp", package: "grpc-ios"), ], path: "Firestore/core/swift", publicHeadersPath: "include", // Path to the public headers From e6785f59e7494e794ef51e42e80c4a8f9fd887df Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Thu, 2 Jan 2025 16:50:31 -0500 Subject: [PATCH 17/30] Add getResult Callback --- Firestore/Source/API/FIRQuery.mm | 56 ++++++++++++++++ .../Public/FirebaseFirestore/FIRQuery.h | 30 +++++++++ .../Swift/Source/SwiftAPI/Pipeline.swift | 30 ++++----- .../Source/SwiftAPI/PipelineResult.swift | 14 ++++ Firestore/core/swift/include/pipeline.h | 3 +- Firestore/core/swift/src/pipeline.cc | 66 +++++++++++++++++-- 6 files changed, 174 insertions(+), 25 deletions(-) diff --git a/Firestore/Source/API/FIRQuery.mm b/Firestore/Source/API/FIRQuery.mm index d4185488341..792376fad89 100644 --- a/Firestore/Source/API/FIRQuery.mm +++ b/Firestore/Source/API/FIRQuery.mm @@ -63,6 +63,8 @@ #include "Firestore/core/src/util/exception.h" #include "Firestore/core/src/util/statusor.h" #include "Firestore/core/src/util/string_apple.h" +#include "Firestore/core/swift/include/pipeline.h" +#include "Firestore/core/swift/include/pipeline_result.h" #include "absl/strings/match.h" namespace nanopb = firebase::firestore::nanopb; @@ -71,6 +73,8 @@ using firebase::firestore::google_firestore_v1_Value_fields; using firebase::firestore::api::Firestore; using firebase::firestore::api::MakeListenSource; +using firebase::firestore::api::PipelineResult; +using firebase::firestore::api::PipelineSnapshotListener; using firebase::firestore::api::Query; using firebase::firestore::api::QueryListenerRegistration; using firebase::firestore::api::QuerySnapshot; @@ -175,6 +179,35 @@ - (void)getDocumentsWithCompletion:(void (^)(FIRQuerySnapshot *_Nullable snapsho _query.GetDocuments(Source::Default, [self wrapQuerySnapshotBlock:completion]); } ++ (PipelineSnapshotListener) + wrapPipelineCallback:(std::shared_ptr)firestore + completion:(void (^)(std::shared_ptr> result, + NSError *_Nullable error))completion { + class Converter : public EventListener> { + public: + explicit Converter(std::shared_ptr firestore, PipelineBlock completion) + : firestore_(firestore), completion_(completion) { + } + + void OnEvent(StatusOr> maybe_snapshot) override { + if (maybe_snapshot.ok()) { + completion_( + std::make_shared>( + std::initializer_list{PipelineResult::GetTestResult(firestore_)}), + nullptr); + } else { + completion_(nullptr, MakeNSError(maybe_snapshot.status())); + } + } + + private: + std::shared_ptr firestore_; + PipelineBlock completion_; + }; + + return absl::make_unique(firestore, completion); +} + - (void)getDocumentsWithSource:(FIRFirestoreSource)publicSource completion:(void (^)(FIRQuerySnapshot *_Nullable snapshot, NSError *_Nullable error))completion { @@ -534,6 +567,29 @@ void OnEvent(StatusOr maybe_snapshot) override { return absl::make_unique(block); } ++ (QuerySnapshotListener)wrapPipelineCallbackBlock:(FIRQuerySnapshotBlock)block { + class Converter : public EventListener { + public: + explicit Converter(FIRQuerySnapshotBlock block) : block_(block) { + } + + void OnEvent(StatusOr maybe_snapshot) override { + if (maybe_snapshot.ok()) { + FIRQuerySnapshot *result = + [[FIRQuerySnapshot alloc] initWithSnapshot:std::move(maybe_snapshot).ValueOrDie()]; + block_(result, nil); + } else { + block_(nil, MakeNSError(maybe_snapshot.status())); + } + } + + private: + FIRQuerySnapshotBlock block_; + }; + + return absl::make_unique(block); +} + - (Filter)parseFieldFilter:(FSTUnaryFilter *)unaryFilter { auto describer = [&unaryFilter] { return MakeString(NSStringFromClass([unaryFilter.value class])); diff --git a/Firestore/Source/Public/FirebaseFirestore/FIRQuery.h b/Firestore/Source/Public/FirebaseFirestore/FIRQuery.h index dad8bbd1eed..f7430950de5 100644 --- a/Firestore/Source/Public/FirebaseFirestore/FIRQuery.h +++ b/Firestore/Source/Public/FirebaseFirestore/FIRQuery.h @@ -15,6 +15,7 @@ */ #import +#import #import "FIRFirestoreSource.h" #import "FIRListenerRegistration.h" @@ -28,6 +29,24 @@ @class FIRQuerySnapshot; @class FIRDocumentSnapshot; +namespace firebase { +namespace firestore { +namespace api { +class Firestore; +class PipelineResult; +} // namespace api + +namespace core { +template +class EventListener; +} // namespace core + +} // namespace firestore +} // namespace firebase + +namespace api = firebase::firestore::api; +namespace core = firebase::firestore::core; + NS_ASSUME_NONNULL_BEGIN /** @@ -37,6 +56,12 @@ typedef void (^FIRQuerySnapshotBlock)(FIRQuerySnapshot *_Nullable snapshot, NSError *_Nullable error) NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead."); +typedef void (^PipelineBlock)(std::shared_ptr> result, + NSError *_Nullable error) + NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead."); + +typedef std::shared_ptr> PipelineResultVectorPtr; + /** * A `Query` refers to a query which you can read or listen to. You can also construct * refined `Query` objects by adding filters and ordering. @@ -66,6 +91,11 @@ NS_SWIFT_NAME(Query) (void (^)(FIRQuerySnapshot *_Nullable snapshot, NSError *_Nullable error))completion NS_SWIFT_NAME(getDocuments(completion:)); ++ (std::unique_ptr>>) + wrapPipelineCallback:(std::shared_ptr)firestore + completion:(void (^)(std::shared_ptr> result, + NSError *_Nullable error))completion + NS_SWIFT_NAME(wrapPipelineCallback(firestore:completion:)); /** * Reads the documents matching this query. * diff --git a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift index 552a7351cbf..a9c51018c56 100644 --- a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift +++ b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift @@ -14,22 +14,18 @@ public class Pipeline { } @discardableResult - public func GetPipelineResult() async throws -> PipelineResult { -// return try await withCheckedThrowingContinuation { continuation in -// -// let callback: ( -// firebase.firestore.api.PipelineResult, -// Bool -// ) -> Void = { result, isSucceed in -// if isSucceed { -// continuation.resume(returning: PipelineResult(result)) -// } else { -// continuation.resume(throwing: "ERROR!" as! Error) -// } -// } - - // cppPtr.fetchDataWithCppCallback(callback) - return PipelineResult(firebase.firestore.api.PipelineResult - .GetTestResult(cppPtr.GetFirestore())) + public func GetPipelineResult() async throws -> [PipelineResult] { + return try await withCheckedThrowingContinuation { continuation in + let listener = Query.wrapPipelineCallback(firestore: cppPtr.GetFirestore()) { + result, error in + if let error { + continuation.resume(throwing: error) + } else { + // Our callbacks guarantee that we either return an error or a progress event. + continuation.resume(returning: PipelineResult.convertToArrayFromCppVector(result)) + } + } + cppPtr.GetPipelineResult(listener) + } } } diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift index 535cc5bc3b4..b6d47c34d5c 100644 --- a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift +++ b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift @@ -5,10 +5,24 @@ // Created by Cheryl Lin on 2024-12-18. // +@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) public class PipelineResult { let cppPtr: firebase.firestore.api.PipelineResult public init(_ cppSource: firebase.firestore.api.PipelineResult) { cppPtr = cppSource } + + static func convertToArrayFromCppVector(_ vectorPtr: PipelineResultVectorPtr) + -> [PipelineResult] { + // Create a Swift array and populate it by iterating over the C++ vector + var swiftArray: [PipelineResult] = [] + + for index in vectorPtr.pointee.indices { + let cppResult = vectorPtr.pointee[index] + swiftArray.append(PipelineResult(cppResult)) + } + + return swiftArray + } } diff --git a/Firestore/core/swift/include/pipeline.h b/Firestore/core/swift/include/pipeline.h index 37aa39c0462..e4d8d7d79a0 100644 --- a/Firestore/core/swift/include/pipeline.h +++ b/Firestore/core/swift/include/pipeline.h @@ -31,8 +31,7 @@ class Pipeline { public: Pipeline(std::shared_ptr firestore, Stage stage); - void GetPipelineResult( - std::function callback) const; + void GetPipelineResult(PipelineSnapshotListener callback) const; std::shared_ptr GetFirestore() const { return firestore_; diff --git a/Firestore/core/swift/src/pipeline.cc b/Firestore/core/swift/src/pipeline.cc index 85b85b008ce..570dcdeecfa 100644 --- a/Firestore/core/swift/src/pipeline.cc +++ b/Firestore/core/swift/src/pipeline.cc @@ -1,7 +1,15 @@ #include "Firestore/core/swift/include/pipeline.h" + +#include // NOLINT(build/c++11) +#include + #include "Firestore/core/include/firebase/firestore/timestamp.h" #include "Firestore/core/src/api/firestore.h" +#include "Firestore/core/src/api/listener_registration.h" +#include "Firestore/core/src/api/source.h" #include "Firestore/core/src/core/event_listener.h" +#include "Firestore/core/src/core/listen_options.h" +#include "Firestore/core/src/core/view_snapshot.h" #include "Firestore/core/swift/include/pipeline_result.h" namespace firebase { @@ -9,16 +17,62 @@ namespace firestore { namespace api { +using core::EventListener; +using core::ListenOptions; +using core::ViewSnapshot; + Pipeline::Pipeline(std::shared_ptr firestore, Stage stage) : firestore_(firestore), stage_(stage) { } -void Pipeline::GetPipelineResult( - std::function callback) const { - callback(PipelineResult(firestore_, std::make_shared(0, 0), - std::make_shared(0, 0), - std::make_shared(0, 0)), - true); +void Pipeline::GetPipelineResult(PipelineSnapshotListener callback) const { + ListenOptions options( + /*include_query_metadata_changes=*/true, + /*include_document_metadata_changes=*/true, + /*wait_for_sync_when_online=*/true); + + class ListenOnce : public EventListener> { + public: + ListenOnce(PipelineSnapshotListener listener) + : listener_(std::move(listener)) { + } + + void OnEvent( + StatusOr> maybe_snapshot) override { + if (!maybe_snapshot.ok()) { + listener_->OnEvent(std::move(maybe_snapshot)); + return; + } + + std::vector snapshot = + std::move(maybe_snapshot).ValueOrDie(); + + // Remove query first before passing event to user to avoid user actions + // affecting the now stale query. + std::unique_ptr registration = + registration_promise_.get_future().get(); + registration->Remove(); + + listener_->OnEvent(std::move(snapshot)); + }; + + void Resolve(std::unique_ptr registration) { + registration_promise_.set_value(std::move(registration)); + } + + private: + PipelineSnapshotListener listener_; + + std::promise> registration_promise_; + }; + + auto listener = absl::make_unique(std::move(callback)); + auto* listener_unowned = listener.get(); + + // std::unique_ptr registration = + // AddSnapshotListener(std::move(options), std::move(listener)); + // + // listener_unowned->Resolve(std::move(registration)); } } // namespace api From e880583687fd74723ab059c8c2d977f97b561b29 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Fri, 3 Jan 2025 14:29:05 -0500 Subject: [PATCH 18/30] invoke callback --- Firestore/core/swift/src/pipeline.cc | 79 +++++++++++++++------------- 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/Firestore/core/swift/src/pipeline.cc b/Firestore/core/swift/src/pipeline.cc index 570dcdeecfa..7aa019f4e0d 100644 --- a/Firestore/core/swift/src/pipeline.cc +++ b/Firestore/core/swift/src/pipeline.cc @@ -31,43 +31,48 @@ void Pipeline::GetPipelineResult(PipelineSnapshotListener callback) const { /*include_document_metadata_changes=*/true, /*wait_for_sync_when_online=*/true); - class ListenOnce : public EventListener> { - public: - ListenOnce(PipelineSnapshotListener listener) - : listener_(std::move(listener)) { - } - - void OnEvent( - StatusOr> maybe_snapshot) override { - if (!maybe_snapshot.ok()) { - listener_->OnEvent(std::move(maybe_snapshot)); - return; - } - - std::vector snapshot = - std::move(maybe_snapshot).ValueOrDie(); - - // Remove query first before passing event to user to avoid user actions - // affecting the now stale query. - std::unique_ptr registration = - registration_promise_.get_future().get(); - registration->Remove(); - - listener_->OnEvent(std::move(snapshot)); - }; - - void Resolve(std::unique_ptr registration) { - registration_promise_.set_value(std::move(registration)); - } - - private: - PipelineSnapshotListener listener_; - - std::promise> registration_promise_; - }; - - auto listener = absl::make_unique(std::move(callback)); - auto* listener_unowned = listener.get(); + callback->OnEvent(StatusOr>( + {(PipelineResult::GetTestResult(firestore_))})); + + // class ListenOnce : public EventListener> { + // public: + // ListenOnce(PipelineSnapshotListener listener) + // : listener_(std::move(listener)) { + // } + // + // void OnEvent( + // StatusOr> maybe_snapshot) override { + // if (!maybe_snapshot.ok()) { + // listener_->OnEvent(std::move(maybe_snapshot)); + // return; + // } + // + // std::vector snapshot = + // std::move(maybe_snapshot).ValueOrDie(); + // + // // Remove query first before passing event to user to avoid user + // actions + // // affecting the now stale query. + // std::unique_ptr registration = + // registration_promise_.get_future().get(); + // registration->Remove(); + // + // listener_->OnEvent(std::move(snapshot)); + // }; + // + // void Resolve(std::unique_ptr registration) { + // registration_promise_.set_value(std::move(registration)); + // } + // + // private: + // PipelineSnapshotListener listener_; + // + // std::promise> + // registration_promise_; + // }; + // + // auto listener = absl::make_unique(std::move(callback)); + // auto* listener_unowned = listener.get(); // std::unique_ptr registration = // AddSnapshotListener(std::move(options), std::move(listener)); From 9d9b7c24c08f6d0f9ccf795d86b366c99ab77500 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Mon, 6 Jan 2025 16:58:09 -0500 Subject: [PATCH 19/30] refactor part of code --- FirebaseFirestoreInternal.podspec | 4 +- .../Firestore.xcodeproj/project.pbxproj | 12 ++-- .../Tests/API/FIRAggregateQueryUnitTests.mm | 2 +- .../Tests/API/FIRQuerySnapshotTests.mm | 2 +- .../Example/Tests/API/FIRQueryUnitTests.mm | 4 +- Firestore/Example/Tests/API/FSTAPIHelpers.mm | 6 +- .../Tests/Integration/API/FIRDatabaseTests.mm | 2 +- .../Source/API/FIRAggregateQuerySnapshot.mm | 2 +- Firestore/Source/API/FIRDocumentSnapshot.mm | 4 +- Firestore/Source/API/FIRFirestore.mm | 2 +- Firestore/Source/API/FIRInterface.mm | 36 ----------- Firestore/Source/API/FIRQuery.mm | 6 +- .../Public/FirebaseFirestore/FIRFirestore.h | 4 +- .../Public/FirebaseFirestore/FIRInterface.h | 29 --------- .../AsyncAwait/Firestore+AsyncAwait.swift | 3 +- .../Swift/Source/SwiftAPI/Pipeline.swift | 12 ++-- .../Source/SwiftAPI/PipelineResult.swift | 7 ++- .../Source/SwiftAPI/PipelineSource.swift | 6 +- .../Swift/Source/SwiftAPI/SwiftCppAPI.swift | 25 -------- Firestore/core/CMakeLists.txt | 3 +- .../api}/FirebaseFirestoreCpp.h | 1 - .../api}/collection_stage.cc | 2 +- .../api}/collection_stage.h | 0 .../api}/firestore_pipeline.cc | 2 +- .../api}/firestore_pipeline.h | 0 .../src => interfaceForSwift/api}/pipeline.cc | 4 +- .../api}/pipeline.h | 0 .../api}/pipeline_result.cc | 2 +- .../api}/pipeline_result.h | 0 .../api}/pipeline_source.cc | 5 +- .../api}/pipeline_source.h | 0 .../src => interfaceForSwift/api}/stage.cc | 4 +- .../include => interfaceForSwift/api}/stage.h | 0 Firestore/core/src/api/firestore.h | 2 +- Firestore/core/src/api/used_by_objective_c.cc | 22 ------- Firestore/core/src/api/used_by_objective_c.h | 27 -------- Firestore/core/swift/include/used_by_swift.h | 27 -------- Firestore/core/swift/src/used_by_swift.cc | 22 ------- Package.swift | 63 +++++++++++++------ 39 files changed, 98 insertions(+), 256 deletions(-) delete mode 100644 Firestore/Source/API/FIRInterface.mm delete mode 100644 Firestore/Source/Public/FirebaseFirestore/FIRInterface.h delete mode 100644 Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift rename Firestore/core/{swift/include => interfaceForSwift/api}/FirebaseFirestoreCpp.h (97%) rename Firestore/core/{swift/src => interfaceForSwift/api}/collection_stage.cc (82%) rename Firestore/core/{swift/include => interfaceForSwift/api}/collection_stage.h (100%) rename Firestore/core/{swift/src => interfaceForSwift/api}/firestore_pipeline.cc (81%) rename Firestore/core/{swift/include => interfaceForSwift/api}/firestore_pipeline.h (100%) rename Firestore/core/{swift/src => interfaceForSwift/api}/pipeline.cc (95%) rename Firestore/core/{swift/include => interfaceForSwift/api}/pipeline.h (100%) rename Firestore/core/{swift/src => interfaceForSwift/api}/pipeline_result.cc (93%) rename Firestore/core/{swift/include => interfaceForSwift/api}/pipeline_result.h (100%) rename Firestore/core/{swift/src => interfaceForSwift/api}/pipeline_source.cc (79%) rename Firestore/core/{swift/include => interfaceForSwift/api}/pipeline_source.h (100%) rename Firestore/core/{swift/src => interfaceForSwift/api}/stage.cc (61%) rename Firestore/core/{swift/include => interfaceForSwift/api}/stage.h (100%) delete mode 100644 Firestore/core/src/api/used_by_objective_c.cc delete mode 100644 Firestore/core/src/api/used_by_objective_c.h delete mode 100644 Firestore/core/swift/include/used_by_swift.h delete mode 100644 Firestore/core/swift/src/used_by_swift.cc diff --git a/FirebaseFirestoreInternal.podspec b/FirebaseFirestoreInternal.podspec index bc19e2dc5d2..ceb8a133038 100644 --- a/FirebaseFirestoreInternal.podspec +++ b/FirebaseFirestoreInternal.podspec @@ -30,7 +30,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, # framework. s.public_header_files = [ 'Firestore/Source/Public/FirebaseFirestore/*.h', - 'Firestore/core/swift/include/*.h' + 'Firestore/core/interfaceForSwift/api/*.h' ] # source_files contains most of the header and source files for the project. @@ -55,7 +55,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, 'Firestore/core/include/**/*.{cc,mm}', 'Firestore/core/src/**/*.{cc,mm}', 'FirebaseAuth/Interop/**/*.h', - 'Firestore/core/swift/**/*.{cc,h}', + 'Firestore/core/interfaceForSwift/**/*.{cc,h}', ] # Internal headers that aren't necessarily globally unique. Most C++ internal diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj index dbc692eca2e..667479801c1 100644 --- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj +++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj @@ -2184,8 +2184,8 @@ files = ( 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, - 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, DFA186FE5BBFB484C2A60439 /* Pods_Firestore_Example_iOS.framework in Frameworks */, + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2194,9 +2194,9 @@ buildActionMask = 2147483647; files = ( 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, + 45CA70C602DD3DDAEF05DCAA /* Pods_Firestore_Tests_iOS.framework in Frameworks */, 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, - 45CA70C602DD3DDAEF05DCAA /* Pods_Firestore_Tests_iOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2205,9 +2205,9 @@ buildActionMask = 2147483647; files = ( 6EDD3B4620BF247500C33877 /* Foundation.framework in Frameworks */, + 0E24350AA378A5A8D9927B9D /* Pods_Firestore_FuzzTests_iOS.framework in Frameworks */, 6EDD3B4820BF247500C33877 /* UIKit.framework in Frameworks */, 6EDD3B4920BF247500C33877 /* XCTest.framework in Frameworks */, - 0E24350AA378A5A8D9927B9D /* Pods_Firestore_FuzzTests_iOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2224,9 +2224,9 @@ buildActionMask = 2147483647; files = ( DE03B2D61F2149D600A30B9C /* Foundation.framework in Frameworks */, + 8F59A2CC5A9E99BB2DEA7F91 /* Pods_Firestore_IntegrationTests_iOS.framework in Frameworks */, DE03B2D51F2149D600A30B9C /* UIKit.framework in Frameworks */, DE03B2D41F2149D600A30B9C /* XCTest.framework in Frameworks */, - 8F59A2CC5A9E99BB2DEA7F91 /* Pods_Firestore_IntegrationTests_iOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2623,8 +2623,6 @@ children = ( 6003F58F195388D20070C39A /* CoreGraphics.framework */, 6003F58D195388D20070C39A /* Foundation.framework */, - 6003F591195388D20070C39A /* UIKit.framework */, - 6003F5AF195388D20070C39A /* XCTest.framework */, 8F598CD89DBDF6EE959C7F82 /* Pods_Firestore_Benchmarks_iOS.framework */, 27A5406BD14580197A127B93 /* Pods_Firestore_Example_iOS.framework */, 75532670EC61672D0CF0D743 /* Pods_Firestore_Example_macOS.framework */, @@ -2636,6 +2634,8 @@ BAAC6F56A47F795224077898 /* Pods_Firestore_Tests_iOS.framework */, 11DF548295F98F22C70127D8 /* Pods_Firestore_Tests_macOS.framework */, 46E38E88A7A020F4E721E373 /* Pods_Firestore_Tests_tvOS.framework */, + 6003F591195388D20070C39A /* UIKit.framework */, + 6003F5AF195388D20070C39A /* XCTest.framework */, ); name = Frameworks; sourceTree = ""; diff --git a/Firestore/Example/Tests/API/FIRAggregateQueryUnitTests.mm b/Firestore/Example/Tests/API/FIRAggregateQueryUnitTests.mm index c65c1c0470b..cb25e93dc4c 100644 --- a/Firestore/Example/Tests/API/FIRAggregateQueryUnitTests.mm +++ b/Firestore/Example/Tests/API/FIRAggregateQueryUnitTests.mm @@ -40,7 +40,7 @@ @interface FIRAggregateQueryUnitTests : XCTestCase @implementation FIRAggregateQueryUnitTests - (void)testEquals { - std::shared_ptr firestore = FSTTestFirestore().wrapped; + std::shared_ptr firestore = FSTTestFirestore().cppFirestorePtr; FIRAggregateQuery *queryFoo = [[FIRQuery alloc] initWithQuery:Query("foo") firestore:firestore].count; FIRAggregateQuery *queryFooDup = diff --git a/Firestore/Example/Tests/API/FIRQuerySnapshotTests.mm b/Firestore/Example/Tests/API/FIRQuerySnapshotTests.mm index b1ed7a97d12..91899707e30 100644 --- a/Firestore/Example/Tests/API/FIRQuerySnapshotTests.mm +++ b/Firestore/Example/Tests/API/FIRQuerySnapshotTests.mm @@ -99,7 +99,7 @@ - (void)testIncludeMetadataChanges { DocumentViewChange(doc2New, DocumentViewChange::Type::Modified), }; - std::shared_ptr firestore = FSTTestFirestore().wrapped; + std::shared_ptr firestore = FSTTestFirestore().cppFirestorePtr; core::Query query = Query("foo"); ViewSnapshot viewSnapshot(query, newDocuments, oldDocuments, std::move(documentChanges), /*mutated_keys=*/DocumentKeySet(), diff --git a/Firestore/Example/Tests/API/FIRQueryUnitTests.mm b/Firestore/Example/Tests/API/FIRQueryUnitTests.mm index f7023211a4b..982e57a578b 100644 --- a/Firestore/Example/Tests/API/FIRQueryUnitTests.mm +++ b/Firestore/Example/Tests/API/FIRQueryUnitTests.mm @@ -38,7 +38,7 @@ @interface FIRQueryUnitTests : XCTestCase @implementation FIRQueryUnitTests - (void)testEquals { - std::shared_ptr firestore = FSTTestFirestore().wrapped; + std::shared_ptr firestore = FSTTestFirestore().cppFirestorePtr; FIRQuery *queryFoo = [[FIRQuery alloc] initWithQuery:Query("foo") firestore:firestore]; FIRQuery *queryFooDup = [[FIRQuery alloc] initWithQuery:Query("foo") firestore:firestore]; FIRQuery *queryBar = [[FIRQuery alloc] initWithQuery:Query("bar") firestore:firestore]; @@ -58,7 +58,7 @@ - (void)testEquals { } - (void)testFilteringWithPredicate { - std::shared_ptr firestore = FSTTestFirestore().wrapped; + std::shared_ptr firestore = FSTTestFirestore().cppFirestorePtr; FIRQuery *query = [[FIRQuery alloc] initWithQuery:Query("foo") firestore:firestore]; FIRQuery *query1 = [query queryWhereField:@"f" isLessThanOrEqualTo:@1]; FIRQuery *query2 = [query queryFilteredUsingPredicate:[NSPredicate predicateWithFormat:@"f<=1"]]; diff --git a/Firestore/Example/Tests/API/FSTAPIHelpers.mm b/Firestore/Example/Tests/API/FSTAPIHelpers.mm index f4e5cab83ac..a83c41463a7 100644 --- a/Firestore/Example/Tests/API/FSTAPIHelpers.mm +++ b/Firestore/Example/Tests/API/FSTAPIHelpers.mm @@ -103,12 +103,12 @@ FIRCollectionReference *FSTTestCollectionRef(const char *path) { return [[FIRCollectionReference alloc] initWithPath:Resource(path) - firestore:FSTTestFirestore().wrapped]; + firestore:FSTTestFirestore().cppFirestorePtr]; } FIRDocumentReference *FSTTestDocRef(const char *path) { return [[FIRDocumentReference alloc] initWithPath:Resource(path) - firestore:FSTTestFirestore().wrapped]; + firestore:FSTTestFirestore().cppFirestorePtr]; } /** A convenience method for creating a query snapshots for tests. */ @@ -157,7 +157,7 @@ /*sync_state_changed=*/true, /*excludes_metadata_changes=*/false, static_cast(hasCachedResults)}; - return [[FIRQuerySnapshot alloc] initWithFirestore:FSTTestFirestore().wrapped + return [[FIRQuerySnapshot alloc] initWithFirestore:FSTTestFirestore().cppFirestorePtr originalQuery:Query(path) snapshot:std::move(viewSnapshot) metadata:std::move(metadata)]; diff --git a/Firestore/Example/Tests/Integration/API/FIRDatabaseTests.mm b/Firestore/Example/Tests/Integration/API/FIRDatabaseTests.mm index 28822cb22e5..4cf43c2e6d2 100644 --- a/Firestore/Example/Tests/Integration/API/FIRDatabaseTests.mm +++ b/Firestore/Example/Tests/Integration/API/FIRDatabaseTests.mm @@ -1523,7 +1523,7 @@ - (void)testAppDeleteLeadsToFirestoreTermination { [self deleteApp:app]; - XCTAssertTrue(firestore.wrapped->client()->is_terminated()); + XCTAssertTrue(firestore.cppFirestorePtr->client()->is_terminated()); } // Ensures b/172958106 doesn't regress. diff --git a/Firestore/Source/API/FIRAggregateQuerySnapshot.mm b/Firestore/Source/API/FIRAggregateQuerySnapshot.mm index 393d04843ef..371794ef06a 100644 --- a/Firestore/Source/API/FIRAggregateQuerySnapshot.mm +++ b/Firestore/Source/API/FIRAggregateQuerySnapshot.mm @@ -92,7 +92,7 @@ - (id)valueForAggregateField:(FIRAggregateField *)aggregateField { [aggregateField name], path); } FSTUserDataWriter *dataWriter = - [[FSTUserDataWriter alloc] initWithFirestore:_query.query.firestore.wrapped + [[FSTUserDataWriter alloc] initWithFirestore:_query.query.firestore.cppFirestorePtr serverTimestampBehavior:serverTimestampBehavior]; return [dataWriter convertedValue:*fieldValue]; } diff --git a/Firestore/Source/API/FIRDocumentSnapshot.mm b/Firestore/Source/API/FIRDocumentSnapshot.mm index c74b3446f30..acf33065273 100644 --- a/Firestore/Source/API/FIRDocumentSnapshot.mm +++ b/Firestore/Source/API/FIRDocumentSnapshot.mm @@ -87,9 +87,9 @@ - (instancetype)initWithFirestore:(FIRFirestore *)firestore DocumentSnapshot wrapped; if (document.has_value()) { wrapped = - DocumentSnapshot::FromDocument(firestore.wrapped, document.value(), std::move(metadata)); + DocumentSnapshot::FromDocument(firestore.cppFirestorePtr, document.value(), std::move(metadata)); } else { - wrapped = DocumentSnapshot::FromNoDocument(firestore.wrapped, std::move(documentKey), + wrapped = DocumentSnapshot::FromNoDocument(firestore.cppFirestorePtr, std::move(documentKey), std::move(metadata)); } _serializer.reset(new Serializer(firestore.databaseID)); diff --git a/Firestore/Source/API/FIRFirestore.mm b/Firestore/Source/API/FIRFirestore.mm index f6dbf9dc059..f1eb556f8cd 100644 --- a/Firestore/Source/API/FIRFirestore.mm +++ b/Firestore/Source/API/FIRFirestore.mm @@ -531,7 +531,7 @@ - (void)getQueryNamed:(NSString *)name completion:(void (^)(FIRQuery *_Nullable @implementation FIRFirestore (Internal) -- (std::shared_ptr)wrapped { +- (std::shared_ptr)cppFirestorePtr { return _firestore; } diff --git a/Firestore/Source/API/FIRInterface.mm b/Firestore/Source/API/FIRInterface.mm deleted file mode 100644 index 5dc0e5bac1c..00000000000 --- a/Firestore/Source/API/FIRInterface.mm +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - -#import "Firestore/Source/Public/FirebaseFirestore/FIRInterface.h" - -#import "Firestore/core/src/api/used_by_objective_c.h" -#include "Firestore/core/src/util/string_apple.h" - -using firebase::firestore::util::MakeString; - -NS_ASSUME_NONNULL_BEGIN - -@implementation FIRInterface - -+ (void)print:(NSString *)content { - CppInterfaceCalledByObjectiveC::print(MakeString(content)); -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/API/FIRQuery.mm b/Firestore/Source/API/FIRQuery.mm index 792376fad89..c0af25c4c2a 100644 --- a/Firestore/Source/API/FIRQuery.mm +++ b/Firestore/Source/API/FIRQuery.mm @@ -63,8 +63,8 @@ #include "Firestore/core/src/util/exception.h" #include "Firestore/core/src/util/statusor.h" #include "Firestore/core/src/util/string_apple.h" -#include "Firestore/core/swift/include/pipeline.h" -#include "Firestore/core/swift/include/pipeline_result.h" +#include "Firestore/core/interfaceForSwift/api/pipeline.h" +#include "Firestore/core/interfaceForSwift/api/pipeline_result.h" #include "absl/strings/match.h" namespace nanopb = firebase::firestore::nanopb; @@ -236,7 +236,7 @@ - (void)getDocumentsWithSource:(FIRFirestoreSource)publicSource - (id)addSnapshotListenerInternalWithOptions:(ListenOptions)internalOptions listener: (FIRQuerySnapshotBlock)listener { - std::shared_ptr firestore = self.firestore.wrapped; + std::shared_ptr firestore = self.firestore.cppFirestorePtr; const core::Query &query = self.query; // Convert from ViewSnapshots to QuerySnapshots. diff --git a/Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h b/Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h index 0a74b2924aa..515b1882a9f 100644 --- a/Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h +++ b/Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h @@ -39,7 +39,7 @@ class Firestore; } // namespace firestore } // namespace firebase -namespace api = firebase::firestore::api; +namespace cppApi = firebase::firestore::api; NS_ASSUME_NONNULL_BEGIN @@ -102,7 +102,7 @@ NS_SWIFT_NAME(Firestore) */ + (instancetype)firestoreForDatabase:(NSString *)database NS_SWIFT_NAME(firestore(database:)); -@property(nonatomic, assign, readonly) std::shared_ptr wrapped; +@property(nonatomic, assign, readonly) std::shared_ptr cppFirestorePtr; /** * Custom settings used to configure this `Firestore` object. diff --git a/Firestore/Source/Public/FirebaseFirestore/FIRInterface.h b/Firestore/Source/Public/FirebaseFirestore/FIRInterface.h deleted file mode 100644 index 222b7024e91..00000000000 --- a/Firestore/Source/Public/FirebaseFirestore/FIRInterface.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface FIRInterface : NSObject - -#pragma mark - Create Filter - -+ (void)print:(NSString *)content; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift b/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift index e820372faf1..29fb37f5f5b 100644 --- a/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift +++ b/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift @@ -16,6 +16,7 @@ #if SWIFT_PACKAGE @_exported import FirebaseFirestoreInternalWrapper + import FirebaseFirestoreCpp #else @_exported import FirebaseFirestoreInternal #endif // SWIFT_PACKAGE @@ -117,6 +118,6 @@ public extension Firestore { } func pipeline() -> PipelineSource { - return PipelineSource(firebase.firestore.api.FirestorePipeline.pipeline(wrapped)) + return PipelineSource(firebase.firestore.api.FirestorePipeline.pipeline(cppFirestorePtr)) } } diff --git a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift index a9c51018c56..542e40acd77 100644 --- a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift +++ b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift @@ -5,18 +5,22 @@ // Created by Cheryl Lin on 2024-12-18. // +#if SWIFT_PACKAGE + import FirebaseFirestoreCpp +#endif + @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) public class Pipeline { - var cppPtr: firebase.firestore.api.Pipeline + var cppObj: firebase.firestore.api.Pipeline public init(_ cppSource: firebase.firestore.api.Pipeline) { - cppPtr = cppSource + cppObj = cppSource } @discardableResult public func GetPipelineResult() async throws -> [PipelineResult] { return try await withCheckedThrowingContinuation { continuation in - let listener = Query.wrapPipelineCallback(firestore: cppPtr.GetFirestore()) { + let listener = Query.wrapPipelineCallback(firestore: cppObj.GetFirestore()) { result, error in if let error { continuation.resume(throwing: error) @@ -25,7 +29,7 @@ public class Pipeline { continuation.resume(returning: PipelineResult.convertToArrayFromCppVector(result)) } } - cppPtr.GetPipelineResult(listener) + cppObj.GetPipelineResult(listener) } } } diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift index b6d47c34d5c..253976fb4a3 100644 --- a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift +++ b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift @@ -4,13 +4,16 @@ // // Created by Cheryl Lin on 2024-12-18. // +#if SWIFT_PACKAGE + import FirebaseFirestoreCpp +#endif @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) public class PipelineResult { - let cppPtr: firebase.firestore.api.PipelineResult + let cppObj: firebase.firestore.api.PipelineResult public init(_ cppSource: firebase.firestore.api.PipelineResult) { - cppPtr = cppSource + cppObj = cppSource } static func convertToArrayFromCppVector(_ vectorPtr: PipelineResultVectorPtr) diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift b/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift index 98a2feaf32d..12c84037fdc 100644 --- a/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift +++ b/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift @@ -7,13 +7,13 @@ @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) public class PipelineSource { - let cppPtr: firebase.firestore.api.PipelineSource + let cppObj: firebase.firestore.api.PipelineSource public init(_ cppSource: firebase.firestore.api.PipelineSource) { - cppPtr = cppSource + cppObj = cppSource } public func GetCollection(_ path: String) -> Pipeline { - return Pipeline(cppPtr.GetCollection(std.string(path))) + return Pipeline(cppObj.GetCollection(std.string(path))) } } diff --git a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift b/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift deleted file mode 100644 index fafeec43e98..00000000000 --- a/Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if SWIFT_PACKAGE - @_exported import FirebaseFirestoreCpp -#endif // SWIFT_PACKAGE - -public class SwiftCallingCpp { - public init(_ value: String) { - CppInterfaceCalledBySwift.print(std.string(value)) - } -} diff --git a/Firestore/core/CMakeLists.txt b/Firestore/core/CMakeLists.txt index 4da90c896ee..f0027e6e67c 100644 --- a/Firestore/core/CMakeLists.txt +++ b/Firestore/core/CMakeLists.txt @@ -218,8 +218,7 @@ firebase_ios_glob( src/objc/*.h src/remote/*.cc src/remote/*.h - swift/include/*.h - swift/src/*.cc + interfaceForSwift/api/*.h EXCLUDE ${nanopb_sources} ) diff --git a/Firestore/core/swift/include/FirebaseFirestoreCpp.h b/Firestore/core/interfaceForSwift/api/FirebaseFirestoreCpp.h similarity index 97% rename from Firestore/core/swift/include/FirebaseFirestoreCpp.h rename to Firestore/core/interfaceForSwift/api/FirebaseFirestoreCpp.h index 1ef6e1bcf64..c07e4d187c7 100644 --- a/Firestore/core/swift/include/FirebaseFirestoreCpp.h +++ b/Firestore/core/interfaceForSwift/api/FirebaseFirestoreCpp.h @@ -23,6 +23,5 @@ #import "pipeline_result.h" #import "pipeline_source.h" #import "stage.h" -#import "used_by_swift.h" #endif // FIREBASE_FIREBASEFIRESTORECPP_H diff --git a/Firestore/core/swift/src/collection_stage.cc b/Firestore/core/interfaceForSwift/api/collection_stage.cc similarity index 82% rename from Firestore/core/swift/src/collection_stage.cc rename to Firestore/core/interfaceForSwift/api/collection_stage.cc index cf05216b067..041ee1077cf 100644 --- a/Firestore/core/swift/src/collection_stage.cc +++ b/Firestore/core/interfaceForSwift/api/collection_stage.cc @@ -1,4 +1,4 @@ -#include "Firestore/core/swift/include/collection_stage.h" +#include "Firestore/core/interfaceForSwift/api/collection_stage.h" #include namespace firebase { diff --git a/Firestore/core/swift/include/collection_stage.h b/Firestore/core/interfaceForSwift/api/collection_stage.h similarity index 100% rename from Firestore/core/swift/include/collection_stage.h rename to Firestore/core/interfaceForSwift/api/collection_stage.h diff --git a/Firestore/core/swift/src/firestore_pipeline.cc b/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc similarity index 81% rename from Firestore/core/swift/src/firestore_pipeline.cc rename to Firestore/core/interfaceForSwift/api/firestore_pipeline.cc index f1711d8725d..947a5aa599c 100644 --- a/Firestore/core/swift/src/firestore_pipeline.cc +++ b/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc @@ -1,4 +1,4 @@ -#include "Firestore/core/swift/include/firestore_pipeline.h" +#include "Firestore/core/interfaceForSwift/api/firestore_pipeline.h" #include "Firestore/core/src/api/firestore.h" namespace firebase { diff --git a/Firestore/core/swift/include/firestore_pipeline.h b/Firestore/core/interfaceForSwift/api/firestore_pipeline.h similarity index 100% rename from Firestore/core/swift/include/firestore_pipeline.h rename to Firestore/core/interfaceForSwift/api/firestore_pipeline.h diff --git a/Firestore/core/swift/src/pipeline.cc b/Firestore/core/interfaceForSwift/api/pipeline.cc similarity index 95% rename from Firestore/core/swift/src/pipeline.cc rename to Firestore/core/interfaceForSwift/api/pipeline.cc index 7aa019f4e0d..619334e50e4 100644 --- a/Firestore/core/swift/src/pipeline.cc +++ b/Firestore/core/interfaceForSwift/api/pipeline.cc @@ -1,4 +1,4 @@ -#include "Firestore/core/swift/include/pipeline.h" +#include "Firestore/core/interfaceForSwift/api/pipeline.h" #include // NOLINT(build/c++11) #include @@ -10,7 +10,7 @@ #include "Firestore/core/src/core/event_listener.h" #include "Firestore/core/src/core/listen_options.h" #include "Firestore/core/src/core/view_snapshot.h" -#include "Firestore/core/swift/include/pipeline_result.h" +#include "Firestore/core/interfaceForSwift/api/pipeline_result.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/swift/include/pipeline.h b/Firestore/core/interfaceForSwift/api/pipeline.h similarity index 100% rename from Firestore/core/swift/include/pipeline.h rename to Firestore/core/interfaceForSwift/api/pipeline.h diff --git a/Firestore/core/swift/src/pipeline_result.cc b/Firestore/core/interfaceForSwift/api/pipeline_result.cc similarity index 93% rename from Firestore/core/swift/src/pipeline_result.cc rename to Firestore/core/interfaceForSwift/api/pipeline_result.cc index d337a0f1a6e..1d5ce188305 100644 --- a/Firestore/core/swift/src/pipeline_result.cc +++ b/Firestore/core/interfaceForSwift/api/pipeline_result.cc @@ -1,5 +1,5 @@ -#include "Firestore/core/swift/include/pipeline_result.h" +#include "Firestore/core/interfaceForSwift/api/pipeline_result.h" #include "Firestore/core/include/firebase/firestore/timestamp.h" namespace firebase { diff --git a/Firestore/core/swift/include/pipeline_result.h b/Firestore/core/interfaceForSwift/api/pipeline_result.h similarity index 100% rename from Firestore/core/swift/include/pipeline_result.h rename to Firestore/core/interfaceForSwift/api/pipeline_result.h diff --git a/Firestore/core/swift/src/pipeline_source.cc b/Firestore/core/interfaceForSwift/api/pipeline_source.cc similarity index 79% rename from Firestore/core/swift/src/pipeline_source.cc rename to Firestore/core/interfaceForSwift/api/pipeline_source.cc index 16bc58bf0f5..d16650534b5 100644 --- a/Firestore/core/swift/src/pipeline_source.cc +++ b/Firestore/core/interfaceForSwift/api/pipeline_source.cc @@ -1,8 +1,7 @@ - -#include "Firestore/core/swift/include/pipeline_source.h" +#include "Firestore/core/interfaceForSwift/api/pipeline_source.h" #include "Firestore/core/src/api/document_reference.h" #include "Firestore/core/src/api/firestore.h" -#include "Firestore/core/swift/include/collection_stage.h" +#include "Firestore/core/interfaceForSwift/api/collection_stage.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/swift/include/pipeline_source.h b/Firestore/core/interfaceForSwift/api/pipeline_source.h similarity index 100% rename from Firestore/core/swift/include/pipeline_source.h rename to Firestore/core/interfaceForSwift/api/pipeline_source.h diff --git a/Firestore/core/swift/src/stage.cc b/Firestore/core/interfaceForSwift/api/stage.cc similarity index 61% rename from Firestore/core/swift/src/stage.cc rename to Firestore/core/interfaceForSwift/api/stage.cc index f5d387655a0..c91d7710c60 100644 --- a/Firestore/core/swift/src/stage.cc +++ b/Firestore/core/interfaceForSwift/api/stage.cc @@ -1,4 +1,4 @@ -#include "Firestore/core/swift/include/stage.h" +#include "Firestore/core/interfaceForSwift/api/stage.h" namespace firebase { namespace firestore { @@ -11,4 +11,4 @@ Stage::Stage() { } // namespace api } // namespace firestore -} // namespace firebase \ No newline at end of file +} // namespace firebase diff --git a/Firestore/core/swift/include/stage.h b/Firestore/core/interfaceForSwift/api/stage.h similarity index 100% rename from Firestore/core/swift/include/stage.h rename to Firestore/core/interfaceForSwift/api/stage.h diff --git a/Firestore/core/src/api/firestore.h b/Firestore/core/src/api/firestore.h index 752c4fa568e..8f869cd6387 100644 --- a/Firestore/core/src/api/firestore.h +++ b/Firestore/core/src/api/firestore.h @@ -29,7 +29,7 @@ #include "Firestore/core/src/model/database_id.h" #include "Firestore/core/src/util/byte_stream.h" #include "Firestore/core/src/util/status_fwd.h" -#include "Firestore/core/swift/include/pipeline_source.h" +#include "Firestore/core/interfaceForSwift/api/pipeline_source.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/src/api/used_by_objective_c.cc b/Firestore/core/src/api/used_by_objective_c.cc deleted file mode 100644 index 1333cecfe1f..00000000000 --- a/Firestore/core/src/api/used_by_objective_c.cc +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "used_by_objective_c.h" -#include - -void CppInterfaceCalledByObjectiveC::print(std::string content) { - std::cout << "C++ function runs with value: " << content << std::endl; -} diff --git a/Firestore/core/src/api/used_by_objective_c.h b/Firestore/core/src/api/used_by_objective_c.h deleted file mode 100644 index 06360f441ba..00000000000 --- a/Firestore/core/src/api/used_by_objective_c.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef FIREBASE_USED_BY_SWIFT_H -#define FIREBASE_USED_BY_SWIFT_H - -#include - -class CppInterfaceCalledByObjectiveC { - public: - static void print(std::string content); -}; - -#endif // FIREBASE_USED_BY_SWIFT_H diff --git a/Firestore/core/swift/include/used_by_swift.h b/Firestore/core/swift/include/used_by_swift.h deleted file mode 100644 index e4016b3c6a7..00000000000 --- a/Firestore/core/swift/include/used_by_swift.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef FIREBASE_USED_BY_SWIFT_H -#define FIREBASE_USED_BY_SWIFT_H - -#include - -class CppInterfaceCalledBySwift { - public: - static void print(std::string content); -}; - -#endif // FIREBASE_USED_BY_SWIFT_H diff --git a/Firestore/core/swift/src/used_by_swift.cc b/Firestore/core/swift/src/used_by_swift.cc deleted file mode 100644 index d5261294e62..00000000000 --- a/Firestore/core/swift/src/used_by_swift.cc +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "../include/used_by_swift.h" -#include - -void CppInterfaceCalledBySwift::print(std::string content) { - std::cout << "C++ function runs with value: " << content << std::endl; -} diff --git a/Package.swift b/Package.swift index 7adf39b27c5..388759f14e6 100644 --- a/Package.swift +++ b/Package.swift @@ -1399,24 +1399,49 @@ func firestoreWrapperTarget() -> Target { } func firebaseFirestoreCppTarget() -> Target { - return .target( - name: "FirebaseFirestoreCpp", - dependencies: [ - "FirebaseAppCheckInterop", - "FirebaseCore", - "leveldb", - "FirebaseFirestoreInternalWrapper", - .product(name: "nanopb", package: "nanopb"), - .product(name: "gRPC-cpp", package: "grpc-ios"), - ], - path: "Firestore/core/swift", - publicHeadersPath: "include", // Path to the public headers - cxxSettings: [ - .headerSearchPath("../../../"), - .headerSearchPath("../../Protos/nanopb"), - .headerSearchPath("include"), // Ensure the header search path is correct - ] - ) + if ProcessInfo.processInfo.environment["FIREBASE_SOURCE_FIRESTORE"] != nil { + return .target( + name: "FirebaseFirestoreCpp", + dependencies: [ + "FirebaseAppCheckInterop", + "FirebaseCore", + "leveldb", + "FirebaseFirestoreInternalWrapper", + .product(name: "nanopb", package: "nanopb"), + .product(name: "gRPC-cpp", package: "grpc-ios"), + ], + path: "Firestore/core/interfaceForSwift", + publicHeadersPath: "api", // Path to the public headers + cxxSettings: [ + .headerSearchPath("../../../"), + .headerSearchPath("../../Protos/nanopb"), + .headerSearchPath("api"), // Ensure the header search path is correct + ] + ) + } else { + return .target( + name: "FirebaseFirestoreCpp", + dependencies: [ + "FirebaseAppCheckInterop", + "FirebaseCore", + "leveldb", + "FirebaseFirestoreInternalWrapper", + .product(name: "nanopb", package: "nanopb"), + .product( + name: "gRPC-C++", + package: "grpc-binary", + condition: .when(platforms: [.iOS, .macCatalyst, .tvOS, .macOS]) + ), + ], + path: "Firestore/core/interfaceForSwift", + publicHeadersPath: "api", // Path to the public headers + cxxSettings: [ + .headerSearchPath("../../../"), + .headerSearchPath("../../Protos/nanopb"), + .headerSearchPath("api"), // Ensure the header search path is correct + ] + ) + } } func firestoreTargets() -> [Target] { @@ -1452,7 +1477,7 @@ func firestoreTargets() -> [Target] { "core/CMakeLists.txt", "core/src/util/config_detected.h.in", "core/test/", - "core/swift/", + "core/interfaceForSwift/", "fuzzing/", "test.sh", // Swift PM doesn't recognize hpp files, so we're relying on search paths From 5462e69d73bde06faba15ca4f13022895f0a36b0 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Tue, 7 Jan 2025 13:15:13 -0500 Subject: [PATCH 20/30] move callback wrapper --- Firestore/Source/API/FIRCallbackWrapper.mm | 66 +++++++++++++++++++ Firestore/Source/API/FIRDocumentSnapshot.mm | 4 +- Firestore/Source/API/FIRQuery.mm | 56 ---------------- .../FirebaseFirestore/FIRCallbackWrapper.h | 58 ++++++++++++++++ .../Public/FirebaseFirestore/FIRQuery.h | 29 -------- .../FirebaseFirestore/FirebaseFirestore.h | 1 + .../AsyncAwait/Firestore+AsyncAwait.swift | 2 +- .../Swift/Source/SwiftAPI/Pipeline.swift | 4 +- .../Source/SwiftAPI/PipelineResult.swift | 2 +- .../core/interfaceForSwift/api/pipeline.cc | 2 +- .../interfaceForSwift/api/pipeline_source.cc | 2 +- Firestore/core/src/api/firestore.h | 2 +- 12 files changed, 134 insertions(+), 94 deletions(-) create mode 100644 Firestore/Source/API/FIRCallbackWrapper.mm create mode 100644 Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h diff --git a/Firestore/Source/API/FIRCallbackWrapper.mm b/Firestore/Source/API/FIRCallbackWrapper.mm new file mode 100644 index 00000000000..1681c6642eb --- /dev/null +++ b/Firestore/Source/API/FIRCallbackWrapper.mm @@ -0,0 +1,66 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "FIRCallbackWrapper.h" + +#include +#include +#include + +#include "Firestore/core/interfaceForSwift/api/pipeline.h" +#include "Firestore/core/interfaceForSwift/api/pipeline_result.h" +#include "Firestore/core/src/core/event_listener.h" +#include "Firestore/core/src/util/error_apple.h" +#include "Firestore/core/src/util/statusor.h" + +using firebase::firestore::api::PipelineResult; +using firebase::firestore::api::PipelineSnapshotListener; +using firebase::firestore::core::EventListener; +using firebase::firestore::util::MakeNSError; +using firebase::firestore::util::StatusOr; + +@implementation FIRCallbackWrapper + ++ (PipelineSnapshotListener) + wrapPipelineCallback:(std::shared_ptr)firestore + completion:(void (^)(std::shared_ptr> result, + NSError *_Nullable error))completion { + class Converter : public EventListener> { + public: + explicit Converter(std::shared_ptr firestore, PipelineBlock completion) + : firestore_(firestore), completion_(completion) { + } + + void OnEvent(StatusOr> maybe_snapshot) override { + if (maybe_snapshot.ok()) { + completion_( + std::make_shared>( + std::initializer_list{PipelineResult::GetTestResult(firestore_)}), + nullptr); + } else { + completion_(nullptr, MakeNSError(maybe_snapshot.status())); + } + } + + private: + std::shared_ptr firestore_; + PipelineBlock completion_; + }; + + return absl::make_unique(firestore, completion); +} + +@end diff --git a/Firestore/Source/API/FIRDocumentSnapshot.mm b/Firestore/Source/API/FIRDocumentSnapshot.mm index acf33065273..efa0c94703e 100644 --- a/Firestore/Source/API/FIRDocumentSnapshot.mm +++ b/Firestore/Source/API/FIRDocumentSnapshot.mm @@ -86,8 +86,8 @@ - (instancetype)initWithFirestore:(FIRFirestore *)firestore metadata:(SnapshotMetadata)metadata { DocumentSnapshot wrapped; if (document.has_value()) { - wrapped = - DocumentSnapshot::FromDocument(firestore.cppFirestorePtr, document.value(), std::move(metadata)); + wrapped = DocumentSnapshot::FromDocument(firestore.cppFirestorePtr, document.value(), + std::move(metadata)); } else { wrapped = DocumentSnapshot::FromNoDocument(firestore.cppFirestorePtr, std::move(documentKey), std::move(metadata)); diff --git a/Firestore/Source/API/FIRQuery.mm b/Firestore/Source/API/FIRQuery.mm index c0af25c4c2a..2632cdd5e71 100644 --- a/Firestore/Source/API/FIRQuery.mm +++ b/Firestore/Source/API/FIRQuery.mm @@ -63,8 +63,6 @@ #include "Firestore/core/src/util/exception.h" #include "Firestore/core/src/util/statusor.h" #include "Firestore/core/src/util/string_apple.h" -#include "Firestore/core/interfaceForSwift/api/pipeline.h" -#include "Firestore/core/interfaceForSwift/api/pipeline_result.h" #include "absl/strings/match.h" namespace nanopb = firebase::firestore::nanopb; @@ -73,8 +71,6 @@ using firebase::firestore::google_firestore_v1_Value_fields; using firebase::firestore::api::Firestore; using firebase::firestore::api::MakeListenSource; -using firebase::firestore::api::PipelineResult; -using firebase::firestore::api::PipelineSnapshotListener; using firebase::firestore::api::Query; using firebase::firestore::api::QueryListenerRegistration; using firebase::firestore::api::QuerySnapshot; @@ -179,35 +175,6 @@ - (void)getDocumentsWithCompletion:(void (^)(FIRQuerySnapshot *_Nullable snapsho _query.GetDocuments(Source::Default, [self wrapQuerySnapshotBlock:completion]); } -+ (PipelineSnapshotListener) - wrapPipelineCallback:(std::shared_ptr)firestore - completion:(void (^)(std::shared_ptr> result, - NSError *_Nullable error))completion { - class Converter : public EventListener> { - public: - explicit Converter(std::shared_ptr firestore, PipelineBlock completion) - : firestore_(firestore), completion_(completion) { - } - - void OnEvent(StatusOr> maybe_snapshot) override { - if (maybe_snapshot.ok()) { - completion_( - std::make_shared>( - std::initializer_list{PipelineResult::GetTestResult(firestore_)}), - nullptr); - } else { - completion_(nullptr, MakeNSError(maybe_snapshot.status())); - } - } - - private: - std::shared_ptr firestore_; - PipelineBlock completion_; - }; - - return absl::make_unique(firestore, completion); -} - - (void)getDocumentsWithSource:(FIRFirestoreSource)publicSource completion:(void (^)(FIRQuerySnapshot *_Nullable snapshot, NSError *_Nullable error))completion { @@ -567,29 +534,6 @@ void OnEvent(StatusOr maybe_snapshot) override { return absl::make_unique(block); } -+ (QuerySnapshotListener)wrapPipelineCallbackBlock:(FIRQuerySnapshotBlock)block { - class Converter : public EventListener { - public: - explicit Converter(FIRQuerySnapshotBlock block) : block_(block) { - } - - void OnEvent(StatusOr maybe_snapshot) override { - if (maybe_snapshot.ok()) { - FIRQuerySnapshot *result = - [[FIRQuerySnapshot alloc] initWithSnapshot:std::move(maybe_snapshot).ValueOrDie()]; - block_(result, nil); - } else { - block_(nil, MakeNSError(maybe_snapshot.status())); - } - } - - private: - FIRQuerySnapshotBlock block_; - }; - - return absl::make_unique(block); -} - - (Filter)parseFieldFilter:(FSTUnaryFilter *)unaryFilter { auto describer = [&unaryFilter] { return MakeString(NSStringFromClass([unaryFilter.value class])); diff --git a/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h b/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h new file mode 100644 index 00000000000..25f8df2fa23 --- /dev/null +++ b/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h @@ -0,0 +1,58 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import + +namespace firebase { +namespace firestore { +namespace api { +class Firestore; +class PipelineResult; +} // namespace api + +namespace core { +template +class EventListener; +} // namespace core + +} // namespace firestore +} // namespace firebase + +namespace api = firebase::firestore::api; +namespace core = firebase::firestore::core; + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^PipelineBlock)(std::shared_ptr> result, + NSError *_Nullable error) + NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead."); + +typedef std::shared_ptr> PipelineResultVectorPtr; + +NS_SWIFT_SENDABLE +NS_SWIFT_NAME(CallbackWrapper) +@interface FIRCallbackWrapper : NSObject + ++ (std::unique_ptr>>) + wrapPipelineCallback:(std::shared_ptr)firestore + completion:(void (^)(std::shared_ptr> result, + NSError *_Nullable error))completion + NS_SWIFT_NAME(wrapPipelineCallback(firestore:completion:)); + +@end + +NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Public/FirebaseFirestore/FIRQuery.h b/Firestore/Source/Public/FirebaseFirestore/FIRQuery.h index f7430950de5..46f30beeab1 100644 --- a/Firestore/Source/Public/FirebaseFirestore/FIRQuery.h +++ b/Firestore/Source/Public/FirebaseFirestore/FIRQuery.h @@ -29,24 +29,6 @@ @class FIRQuerySnapshot; @class FIRDocumentSnapshot; -namespace firebase { -namespace firestore { -namespace api { -class Firestore; -class PipelineResult; -} // namespace api - -namespace core { -template -class EventListener; -} // namespace core - -} // namespace firestore -} // namespace firebase - -namespace api = firebase::firestore::api; -namespace core = firebase::firestore::core; - NS_ASSUME_NONNULL_BEGIN /** @@ -56,12 +38,6 @@ typedef void (^FIRQuerySnapshotBlock)(FIRQuerySnapshot *_Nullable snapshot, NSError *_Nullable error) NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead."); -typedef void (^PipelineBlock)(std::shared_ptr> result, - NSError *_Nullable error) - NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead."); - -typedef std::shared_ptr> PipelineResultVectorPtr; - /** * A `Query` refers to a query which you can read or listen to. You can also construct * refined `Query` objects by adding filters and ordering. @@ -91,11 +67,6 @@ NS_SWIFT_NAME(Query) (void (^)(FIRQuerySnapshot *_Nullable snapshot, NSError *_Nullable error))completion NS_SWIFT_NAME(getDocuments(completion:)); -+ (std::unique_ptr>>) - wrapPipelineCallback:(std::shared_ptr)firestore - completion:(void (^)(std::shared_ptr> result, - NSError *_Nullable error))completion - NS_SWIFT_NAME(wrapPipelineCallback(firestore:completion:)); /** * Reads the documents matching this query. * diff --git a/Firestore/Source/Public/FirebaseFirestore/FirebaseFirestore.h b/Firestore/Source/Public/FirebaseFirestore/FirebaseFirestore.h index 7fabad323c8..f8d62b9bddc 100644 --- a/Firestore/Source/Public/FirebaseFirestore/FirebaseFirestore.h +++ b/Firestore/Source/Public/FirebaseFirestore/FirebaseFirestore.h @@ -18,6 +18,7 @@ #import "FIRAggregateQuery.h" #import "FIRAggregateQuerySnapshot.h" #import "FIRAggregateSource.h" +#import "FIRCallbackWrapper.h" #import "FIRCollectionReference.h" #import "FIRDocumentChange.h" #import "FIRDocumentReference.h" diff --git a/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift b/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift index 29fb37f5f5b..d08bb8867b2 100644 --- a/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift +++ b/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift @@ -15,8 +15,8 @@ */ #if SWIFT_PACKAGE - @_exported import FirebaseFirestoreInternalWrapper import FirebaseFirestoreCpp + @_exported import FirebaseFirestoreInternalWrapper #else @_exported import FirebaseFirestoreInternal #endif // SWIFT_PACKAGE diff --git a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift index 542e40acd77..60150d9af83 100644 --- a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift +++ b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift @@ -6,7 +6,7 @@ // #if SWIFT_PACKAGE - import FirebaseFirestoreCpp + import FirebaseFirestoreCpp #endif @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) @@ -20,7 +20,7 @@ public class Pipeline { @discardableResult public func GetPipelineResult() async throws -> [PipelineResult] { return try await withCheckedThrowingContinuation { continuation in - let listener = Query.wrapPipelineCallback(firestore: cppObj.GetFirestore()) { + let listener = CallbackWrapper.wrapPipelineCallback(firestore: cppObj.GetFirestore()) { result, error in if let error { continuation.resume(throwing: error) diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift index 253976fb4a3..fc0c6aced77 100644 --- a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift +++ b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift @@ -5,7 +5,7 @@ // Created by Cheryl Lin on 2024-12-18. // #if SWIFT_PACKAGE - import FirebaseFirestoreCpp + import FirebaseFirestoreCpp #endif @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) diff --git a/Firestore/core/interfaceForSwift/api/pipeline.cc b/Firestore/core/interfaceForSwift/api/pipeline.cc index 619334e50e4..fde34b8794d 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline.cc +++ b/Firestore/core/interfaceForSwift/api/pipeline.cc @@ -4,13 +4,13 @@ #include #include "Firestore/core/include/firebase/firestore/timestamp.h" +#include "Firestore/core/interfaceForSwift/api/pipeline_result.h" #include "Firestore/core/src/api/firestore.h" #include "Firestore/core/src/api/listener_registration.h" #include "Firestore/core/src/api/source.h" #include "Firestore/core/src/core/event_listener.h" #include "Firestore/core/src/core/listen_options.h" #include "Firestore/core/src/core/view_snapshot.h" -#include "Firestore/core/interfaceForSwift/api/pipeline_result.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/interfaceForSwift/api/pipeline_source.cc b/Firestore/core/interfaceForSwift/api/pipeline_source.cc index d16650534b5..f3db5a4b565 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline_source.cc +++ b/Firestore/core/interfaceForSwift/api/pipeline_source.cc @@ -1,7 +1,7 @@ #include "Firestore/core/interfaceForSwift/api/pipeline_source.h" +#include "Firestore/core/interfaceForSwift/api/collection_stage.h" #include "Firestore/core/src/api/document_reference.h" #include "Firestore/core/src/api/firestore.h" -#include "Firestore/core/interfaceForSwift/api/collection_stage.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/src/api/firestore.h b/Firestore/core/src/api/firestore.h index 8f869cd6387..bb39c7a1022 100644 --- a/Firestore/core/src/api/firestore.h +++ b/Firestore/core/src/api/firestore.h @@ -21,6 +21,7 @@ #include // NOLINT(build/c++11) #include +#include "Firestore/core/interfaceForSwift/api/pipeline_source.h" #include "Firestore/core/src/api/api_fwd.h" #include "Firestore/core/src/api/load_bundle_task.h" #include "Firestore/core/src/api/settings.h" @@ -29,7 +30,6 @@ #include "Firestore/core/src/model/database_id.h" #include "Firestore/core/src/util/byte_stream.h" #include "Firestore/core/src/util/status_fwd.h" -#include "Firestore/core/interfaceForSwift/api/pipeline_source.h" namespace firebase { namespace firestore { From 7d2362bc014d79f683cfab3142b034668277ee55 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Tue, 7 Jan 2025 14:27:11 -0500 Subject: [PATCH 21/30] fixing format --- .../Swift/Source/SwiftAPI/Pipeline.swift | 17 ++++++++++++--- .../Source/SwiftAPI/PipelineResult.swift | 18 +++++++++++++--- .../Source/SwiftAPI/PipelineSource.swift | 21 ++++++++++++++++--- .../interfaceForSwift/api/collection_stage.h | 12 ++++++++++- .../api/firestore_pipeline.cc | 2 +- .../api/firestore_pipeline.h | 12 ++++++++++- .../core/interfaceForSwift/api/pipeline.h | 12 ++++++++++- .../interfaceForSwift/api/pipeline_result.cc | 2 +- .../interfaceForSwift/api/pipeline_result.h | 12 ++++++++++- .../interfaceForSwift/api/pipeline_source.h | 12 ++++++++++- Firestore/core/interfaceForSwift/api/stage.h | 12 ++++++++++- 11 files changed, 115 insertions(+), 17 deletions(-) diff --git a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift index 60150d9af83..a7e474e6a0a 100644 --- a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift +++ b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift @@ -1,9 +1,20 @@ +// swift-tools-version:5.9 +// The swift-tools-version declares the minimum version of Swift required to +// build this package. + +// Copyright 2025 Google LLC // -// Pipeline.swift -// Firebase +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Created by Cheryl Lin on 2024-12-18. +// http://www.apache.org/licenses/LICENSE-2.0 // +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #if SWIFT_PACKAGE import FirebaseFirestoreCpp diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift index fc0c6aced77..a361344249b 100644 --- a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift +++ b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift @@ -1,9 +1,21 @@ +// swift-tools-version:5.9 +// The swift-tools-version declares the minimum version of Swift required to +// build this package. + +// Copyright 2025 Google LLC // -// PipelineResult.swift -// Firebase +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Created by Cheryl Lin on 2024-12-18. +// http://www.apache.org/licenses/LICENSE-2.0 // +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #if SWIFT_PACKAGE import FirebaseFirestoreCpp #endif diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift b/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift index 12c84037fdc..af6e7abcc40 100644 --- a/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift +++ b/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift @@ -1,9 +1,24 @@ +// swift-tools-version:5.9 +// The swift-tools-version declares the minimum version of Swift required to +// build this package. + +// Copyright 2025 Google LLC // -// PipelineSource.swift -// Pods +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Created by Cheryl Lin on 2024-12-12. +// http://www.apache.org/licenses/LICENSE-2.0 // +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#if SWIFT_PACKAGE + import FirebaseFirestoreCpp +#endif @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) public class PipelineSource { diff --git a/Firestore/core/interfaceForSwift/api/collection_stage.h b/Firestore/core/interfaceForSwift/api/collection_stage.h index 2ffac6a132e..1c68318af2f 100644 --- a/Firestore/core/interfaceForSwift/api/collection_stage.h +++ b/Firestore/core/interfaceForSwift/api/collection_stage.h @@ -1,6 +1,16 @@ +// Copyright 2025 Google LLC // -// Created by Cheryl Lin on 2024-12-11. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifndef FIREBASE_COLLECTION_GROUP_STAGE_H #define FIREBASE_COLLECTION_GROUP_STAGE_H diff --git a/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc b/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc index 947a5aa599c..d13790ba70b 100644 --- a/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc +++ b/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc @@ -13,4 +13,4 @@ PipelineSource FirestorePipeline::pipeline( } // namespace api } // namespace firestore -} // namespace firebase \ No newline at end of file +} // namespace firebase diff --git a/Firestore/core/interfaceForSwift/api/firestore_pipeline.h b/Firestore/core/interfaceForSwift/api/firestore_pipeline.h index 8aed5a6e815..5c9e0531112 100644 --- a/Firestore/core/interfaceForSwift/api/firestore_pipeline.h +++ b/Firestore/core/interfaceForSwift/api/firestore_pipeline.h @@ -1,6 +1,16 @@ +// Copyright 2025 Google LLC // -// Created by Cheryl Lin on 2024-12-10. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifndef FIREBASE_FIRESTORE_PIPELINE_H #define FIREBASE_FIRESTORE_PIPELINE_H diff --git a/Firestore/core/interfaceForSwift/api/pipeline.h b/Firestore/core/interfaceForSwift/api/pipeline.h index e4d8d7d79a0..374d2d2d460 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline.h +++ b/Firestore/core/interfaceForSwift/api/pipeline.h @@ -1,6 +1,16 @@ +// Copyright 2025 Google LLC // -// Created by Cheryl Lin on 2024-12-11. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifndef FIREBASE_PIPELINE_H #define FIREBASE_PIPELINE_H diff --git a/Firestore/core/interfaceForSwift/api/pipeline_result.cc b/Firestore/core/interfaceForSwift/api/pipeline_result.cc index 1d5ce188305..54996146599 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline_result.cc +++ b/Firestore/core/interfaceForSwift/api/pipeline_result.cc @@ -27,4 +27,4 @@ PipelineResult PipelineResult::GetTestResult( } // namespace api } // namespace firestore -} // namespace firebase \ No newline at end of file +} // namespace firebase diff --git a/Firestore/core/interfaceForSwift/api/pipeline_result.h b/Firestore/core/interfaceForSwift/api/pipeline_result.h index 5197ec0cc97..3ef9276bf35 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline_result.h +++ b/Firestore/core/interfaceForSwift/api/pipeline_result.h @@ -1,6 +1,16 @@ +// Copyright 2025 Google LLC // -// Created by Cheryl Lin on 2024-12-16. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifndef FIREBASE_PIPELINE_RESULT_H #define FIREBASE_PIPELINE_RESULT_H diff --git a/Firestore/core/interfaceForSwift/api/pipeline_source.h b/Firestore/core/interfaceForSwift/api/pipeline_source.h index 5ad4c8b5bce..c325286e2c6 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline_source.h +++ b/Firestore/core/interfaceForSwift/api/pipeline_source.h @@ -1,6 +1,16 @@ +// Copyright 2025 Google LLC // -// Created by Cheryl Lin on 2024-12-09. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifndef FIREBASE_PIPELINE_SOURCE_H #define FIREBASE_PIPELINE_SOURCE_H diff --git a/Firestore/core/interfaceForSwift/api/stage.h b/Firestore/core/interfaceForSwift/api/stage.h index 3ff02f7ff4f..7f30bfcb373 100644 --- a/Firestore/core/interfaceForSwift/api/stage.h +++ b/Firestore/core/interfaceForSwift/api/stage.h @@ -1,6 +1,16 @@ +// Copyright 2025 Google LLC // -// Created by Cheryl Lin on 2024-12-11. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifndef FIREBASE_STAGE_H #define FIREBASE_STAGE_H From 5dc9783b2450cc0defe765b1a64a8a07fa33de3e Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Tue, 7 Jan 2025 16:54:56 -0500 Subject: [PATCH 22/30] change class to struct --- Firestore/Swift/Source/SwiftAPI/Pipeline.swift | 2 +- .../Swift/Source/SwiftAPI/PipelineResult.swift | 2 +- .../Swift/Source/SwiftAPI/PipelineSource.swift | 2 +- .../core/interfaceForSwift/api/collection_stage.cc | 14 ++++++++++++++ .../interfaceForSwift/api/firestore_pipeline.cc | 14 ++++++++++++++ Firestore/core/interfaceForSwift/api/pipeline.cc | 14 ++++++++++++++ .../core/interfaceForSwift/api/pipeline_result.cc | 13 +++++++++++++ .../core/interfaceForSwift/api/pipeline_source.cc | 14 ++++++++++++++ Firestore/core/interfaceForSwift/api/stage.cc | 14 ++++++++++++++ 9 files changed, 86 insertions(+), 3 deletions(-) diff --git a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift index a7e474e6a0a..e2afb33eedf 100644 --- a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift +++ b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift @@ -21,7 +21,7 @@ #endif @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) -public class Pipeline { +public struct Pipeline { var cppObj: firebase.firestore.api.Pipeline public init(_ cppSource: firebase.firestore.api.Pipeline) { diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift index a361344249b..c0cdb9eeccb 100644 --- a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift +++ b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift @@ -21,7 +21,7 @@ #endif @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) -public class PipelineResult { +public struct PipelineResult { let cppObj: firebase.firestore.api.PipelineResult public init(_ cppSource: firebase.firestore.api.PipelineResult) { diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift b/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift index af6e7abcc40..0ea88303743 100644 --- a/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift +++ b/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift @@ -21,7 +21,7 @@ #endif @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) -public class PipelineSource { +public struct PipelineSource { let cppObj: firebase.firestore.api.PipelineSource public init(_ cppSource: firebase.firestore.api.PipelineSource) { diff --git a/Firestore/core/interfaceForSwift/api/collection_stage.cc b/Firestore/core/interfaceForSwift/api/collection_stage.cc index 041ee1077cf..aefb7a3bad7 100644 --- a/Firestore/core/interfaceForSwift/api/collection_stage.cc +++ b/Firestore/core/interfaceForSwift/api/collection_stage.cc @@ -1,3 +1,17 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include "Firestore/core/interfaceForSwift/api/collection_stage.h" #include diff --git a/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc b/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc index d13790ba70b..d2eaebbbdb9 100644 --- a/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc +++ b/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc @@ -1,3 +1,17 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include "Firestore/core/interfaceForSwift/api/firestore_pipeline.h" #include "Firestore/core/src/api/firestore.h" diff --git a/Firestore/core/interfaceForSwift/api/pipeline.cc b/Firestore/core/interfaceForSwift/api/pipeline.cc index fde34b8794d..c1da06de449 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline.cc +++ b/Firestore/core/interfaceForSwift/api/pipeline.cc @@ -1,3 +1,17 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include "Firestore/core/interfaceForSwift/api/pipeline.h" #include // NOLINT(build/c++11) diff --git a/Firestore/core/interfaceForSwift/api/pipeline_result.cc b/Firestore/core/interfaceForSwift/api/pipeline_result.cc index 54996146599..7851c9aeeb8 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline_result.cc +++ b/Firestore/core/interfaceForSwift/api/pipeline_result.cc @@ -1,3 +1,16 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #include "Firestore/core/interfaceForSwift/api/pipeline_result.h" #include "Firestore/core/include/firebase/firestore/timestamp.h" diff --git a/Firestore/core/interfaceForSwift/api/pipeline_source.cc b/Firestore/core/interfaceForSwift/api/pipeline_source.cc index f3db5a4b565..34704cbc64a 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline_source.cc +++ b/Firestore/core/interfaceForSwift/api/pipeline_source.cc @@ -1,3 +1,17 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include "Firestore/core/interfaceForSwift/api/pipeline_source.h" #include "Firestore/core/interfaceForSwift/api/collection_stage.h" #include "Firestore/core/src/api/document_reference.h" diff --git a/Firestore/core/interfaceForSwift/api/stage.cc b/Firestore/core/interfaceForSwift/api/stage.cc index c91d7710c60..056e2576741 100644 --- a/Firestore/core/interfaceForSwift/api/stage.cc +++ b/Firestore/core/interfaceForSwift/api/stage.cc @@ -1,3 +1,17 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include "Firestore/core/interfaceForSwift/api/stage.h" namespace firebase { From da80692a87d7f39ca62828f3a6a6a0c168ab903a Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Wed, 8 Jan 2025 12:02:22 -0500 Subject: [PATCH 23/30] address part of feedbacks --- Firestore/Swift/Source/SwiftAPI/Pipeline.swift | 10 +++++----- Firestore/Swift/Source/SwiftAPI/PipelineResult.swift | 4 ---- Firestore/Swift/Source/SwiftAPI/PipelineSource.swift | 4 ---- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift index e2afb33eedf..26e1e342783 100644 --- a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift +++ b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift @@ -1,7 +1,3 @@ -// swift-tools-version:5.9 -// The swift-tools-version declares the minimum version of Swift required to -// build this package. - // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,7 +14,11 @@ #if SWIFT_PACKAGE import FirebaseFirestoreCpp -#endif + @_exported import FirebaseFirestoreInternalWrapper +#else + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE +import Foundation @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) public struct Pipeline { diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift index c0cdb9eeccb..62dbd721859 100644 --- a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift +++ b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift @@ -1,7 +1,3 @@ -// swift-tools-version:5.9 -// The swift-tools-version declares the minimum version of Swift required to -// build this package. - // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift b/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift index 0ea88303743..031f49062b9 100644 --- a/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift +++ b/Firestore/Swift/Source/SwiftAPI/PipelineSource.swift @@ -1,7 +1,3 @@ -// swift-tools-version:5.9 -// The swift-tools-version declares the minimum version of Swift required to -// build this package. - // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); From dbf10d8d799e336cd67252155ffa051c64f9a3ef Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Wed, 8 Jan 2025 12:54:07 -0500 Subject: [PATCH 24/30] Address more feedbacks --- .../Public/FirebaseFirestore/FIRCallbackWrapper.h | 12 +++++++++--- .../Source/Public/FirebaseFirestore/FIRFirestore.h | 2 +- Firestore/Source/Public/FirebaseFirestore/FIRQuery.h | 1 - 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h b/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h index 25f8df2fa23..d5ae24f1602 100644 --- a/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h +++ b/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h @@ -15,7 +15,8 @@ */ #import -#import +#include +#include namespace firebase { namespace firestore { @@ -47,10 +48,15 @@ NS_SWIFT_SENDABLE NS_SWIFT_NAME(CallbackWrapper) @interface FIRCallbackWrapper : NSObject +// Note: Marking callbacks in callback-based APIs as `Sendable` can help prevent crashes when they +// are invoked on a different thread than the one they were originally defined in. If this callback +// is expected to be called on a different thread, it should be marked as `Sendable` to ensure +// thread safety. + (std::unique_ptr>>) wrapPipelineCallback:(std::shared_ptr)firestore - completion:(void (^)(std::shared_ptr> result, - NSError *_Nullable error))completion + completion:(void (^NS_SWIFT_SENDABLE)( + std::shared_ptr> result, + NSError *_Nullable error))completion NS_SWIFT_NAME(wrapPipelineCallback(firestore:completion:)); @end diff --git a/Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h b/Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h index 515b1882a9f..ca48b1b8f94 100644 --- a/Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h +++ b/Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h @@ -15,7 +15,7 @@ */ #import -#import +#include #import "FIRListenerRegistration.h" diff --git a/Firestore/Source/Public/FirebaseFirestore/FIRQuery.h b/Firestore/Source/Public/FirebaseFirestore/FIRQuery.h index 46f30beeab1..dad8bbd1eed 100644 --- a/Firestore/Source/Public/FirebaseFirestore/FIRQuery.h +++ b/Firestore/Source/Public/FirebaseFirestore/FIRQuery.h @@ -15,7 +15,6 @@ */ #import -#import #import "FIRFirestoreSource.h" #import "FIRListenerRegistration.h" From 0e652a75fc06040abc6208283d840bb2b142c752 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Thu, 9 Jan 2025 14:23:54 -0500 Subject: [PATCH 25/30] fix some syntaxs --- .../core/interfaceForSwift/api/FirebaseFirestoreCpp.h | 6 +++--- .../core/interfaceForSwift/api/collection_stage.cc | 4 ++-- .../core/interfaceForSwift/api/collection_stage.h | 8 ++++---- .../core/interfaceForSwift/api/firestore_pipeline.cc | 3 +++ .../core/interfaceForSwift/api/firestore_pipeline.h | 8 +++++--- Firestore/core/interfaceForSwift/api/pipeline.h | 6 +++--- Firestore/core/interfaceForSwift/api/pipeline_result.h | 6 +++--- .../core/interfaceForSwift/api/pipeline_source.cc | 3 +++ Firestore/core/interfaceForSwift/api/pipeline_source.h | 10 ++++++---- Firestore/core/interfaceForSwift/api/stage.h | 6 +++--- 10 files changed, 35 insertions(+), 25 deletions(-) diff --git a/Firestore/core/interfaceForSwift/api/FirebaseFirestoreCpp.h b/Firestore/core/interfaceForSwift/api/FirebaseFirestoreCpp.h index c07e4d187c7..b5191cc4363 100644 --- a/Firestore/core/interfaceForSwift/api/FirebaseFirestoreCpp.h +++ b/Firestore/core/interfaceForSwift/api/FirebaseFirestoreCpp.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef FIREBASE_FIREBASEFIRESTORECPP_H -#define FIREBASE_FIREBASEFIRESTORECPP_H +#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIREBASEFIRESTORECPP_H_ +#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIREBASEFIRESTORECPP_H_ #import "collection_stage.h" #import "firestore_pipeline.h" @@ -24,4 +24,4 @@ #import "pipeline_source.h" #import "stage.h" -#endif // FIREBASE_FIREBASEFIRESTORECPP_H +#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIREBASEFIRESTORECPP_H_ diff --git a/Firestore/core/interfaceForSwift/api/collection_stage.cc b/Firestore/core/interfaceForSwift/api/collection_stage.cc index aefb7a3bad7..3a2654b6dc4 100644 --- a/Firestore/core/interfaceForSwift/api/collection_stage.cc +++ b/Firestore/core/interfaceForSwift/api/collection_stage.cc @@ -23,9 +23,9 @@ namespace api { Collection::Collection(std::string collection_path) : collection_path_(collection_path) { std::cout << "Calling Pipeline Collection ctor" << std::endl; -}; +} } // namespace api } // namespace firestore -} // namespace firebase \ No newline at end of file +} // namespace firebase diff --git a/Firestore/core/interfaceForSwift/api/collection_stage.h b/Firestore/core/interfaceForSwift/api/collection_stage.h index 1c68318af2f..28fe7590fa4 100644 --- a/Firestore/core/interfaceForSwift/api/collection_stage.h +++ b/Firestore/core/interfaceForSwift/api/collection_stage.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FIREBASE_COLLECTION_GROUP_STAGE_H -#define FIREBASE_COLLECTION_GROUP_STAGE_H +#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTION_STAGE_H_ +#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTION_STAGE_H_ #include #include "stage.h" @@ -25,7 +25,7 @@ namespace api { class Collection : public Stage { public: - Collection(std::string collection_path); + explicit Collection(std::string collection_path); private: std::string collection_path_; @@ -36,4 +36,4 @@ class Collection : public Stage { } // namespace firestore } // namespace firebase -#endif // FIREBASE_COLLECTION_GROUP_STAGE_H +#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTION_STAGE_H_ diff --git a/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc b/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc index d2eaebbbdb9..fabd05ad7cc 100644 --- a/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc +++ b/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc @@ -13,6 +13,9 @@ // limitations under the License. #include "Firestore/core/interfaceForSwift/api/firestore_pipeline.h" + +#include + #include "Firestore/core/src/api/firestore.h" namespace firebase { diff --git a/Firestore/core/interfaceForSwift/api/firestore_pipeline.h b/Firestore/core/interfaceForSwift/api/firestore_pipeline.h index 5c9e0531112..7b246c3c87f 100644 --- a/Firestore/core/interfaceForSwift/api/firestore_pipeline.h +++ b/Firestore/core/interfaceForSwift/api/firestore_pipeline.h @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FIREBASE_FIRESTORE_PIPELINE_H -#define FIREBASE_FIRESTORE_PIPELINE_H +#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTORE_PIPELINE_H_ +#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTORE_PIPELINE_H_ + +#include #include "pipeline_source.h" @@ -32,4 +34,4 @@ class FirestorePipeline { } // namespace firestore } // namespace firebase -#endif // FIREBASE_FIRESTORE_PIPELINE_H +#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTORE_PIPELINE_H_ diff --git a/Firestore/core/interfaceForSwift/api/pipeline.h b/Firestore/core/interfaceForSwift/api/pipeline.h index 374d2d2d460..3a693e9880f 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline.h +++ b/Firestore/core/interfaceForSwift/api/pipeline.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FIREBASE_PIPELINE_H -#define FIREBASE_PIPELINE_H +#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_H_ +#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_H_ #include #include @@ -57,4 +57,4 @@ class Pipeline { } // namespace firestore } // namespace firebase -#endif // FIREBASE_PIPELINE_H +#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_H_ diff --git a/Firestore/core/interfaceForSwift/api/pipeline_result.h b/Firestore/core/interfaceForSwift/api/pipeline_result.h index 3ef9276bf35..10488aa9557 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline_result.h +++ b/Firestore/core/interfaceForSwift/api/pipeline_result.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FIREBASE_PIPELINE_RESULT_H -#define FIREBASE_PIPELINE_RESULT_H +#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_RESULT_H_ +#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_RESULT_H_ #include @@ -48,4 +48,4 @@ class PipelineResult { } // namespace firestore } // namespace firebase -#endif // FIREBASE_PIPELINE_RESULT_H +#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_RESULT_H_ diff --git a/Firestore/core/interfaceForSwift/api/pipeline_source.cc b/Firestore/core/interfaceForSwift/api/pipeline_source.cc index 34704cbc64a..9798577661e 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline_source.cc +++ b/Firestore/core/interfaceForSwift/api/pipeline_source.cc @@ -13,6 +13,9 @@ // limitations under the License. #include "Firestore/core/interfaceForSwift/api/pipeline_source.h" + +#include + #include "Firestore/core/interfaceForSwift/api/collection_stage.h" #include "Firestore/core/src/api/document_reference.h" #include "Firestore/core/src/api/firestore.h" diff --git a/Firestore/core/interfaceForSwift/api/pipeline_source.h b/Firestore/core/interfaceForSwift/api/pipeline_source.h index c325286e2c6..7a1c91f35c3 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline_source.h +++ b/Firestore/core/interfaceForSwift/api/pipeline_source.h @@ -12,11 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FIREBASE_PIPELINE_SOURCE_H -#define FIREBASE_PIPELINE_SOURCE_H +#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_SOURCE_H_ +#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_SOURCE_H_ #include +#include #include + #include "pipeline.h" namespace firebase { @@ -29,7 +31,7 @@ class DocumentReference; class PipelineSource { public: - PipelineSource(std::shared_ptr firestore); + explicit PipelineSource(std::shared_ptr firestore); Pipeline GetCollection(std::string collection_path) const; @@ -42,4 +44,4 @@ class PipelineSource { } // namespace firestore } // namespace firebase -#endif // FIREBASE_PIPELINE_SOURCE_H +#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_SOURCE_H_ diff --git a/Firestore/core/interfaceForSwift/api/stage.h b/Firestore/core/interfaceForSwift/api/stage.h index 7f30bfcb373..b9a8e83e112 100644 --- a/Firestore/core/interfaceForSwift/api/stage.h +++ b/Firestore/core/interfaceForSwift/api/stage.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FIREBASE_STAGE_H -#define FIREBASE_STAGE_H +#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_STAGE_H_ +#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_STAGE_H_ namespace firebase { namespace firestore { @@ -30,4 +30,4 @@ class Stage { } // namespace firestore } // namespace firebase -#endif // FIREBASE_STAGE_H +#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_STAGE_H_ From 5bde2753898dcbd87a692668d7d603908cc22b8d Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Thu, 16 Jan 2025 11:53:03 -0500 Subject: [PATCH 26/30] Add tests, bug: double free --- .../Firestore.xcodeproj/project.pbxproj | 17 +++++++++--- .../Firestore_IntegrationTests_iOS.xcscheme | 1 + Firestore/Source/API/FIRCallbackWrapper.mm | 12 ++++----- .../FirebaseFirestore/FIRCallbackWrapper.h | 10 +++---- .../Source/SwiftAPI/PipelineResult.swift | 6 ++--- .../Tests/Integration/PipelineTests.swift | 26 +++++++++++++++++++ Firestore/core/src/api/firestore.cc | 3 ++- 7 files changed, 54 insertions(+), 21 deletions(-) create mode 100644 Firestore/Swift/Tests/Integration/PipelineTests.swift diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj index 667479801c1..0e073bf64cb 100644 --- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj +++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj @@ -882,6 +882,7 @@ 7A2D523AEF58B1413CC8D64F /* query_engine_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B8A853940305237AFDA8050B /* query_engine_test.cc */; }; 7A3BE0ED54933C234FDE23D1 /* leveldb_util_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 332485C4DCC6BA0DBB5E31B7 /* leveldb_util_test.cc */; }; 7A66A2CB5CF33F0C28202596 /* status_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54A0352C20A3B3D7003E0143 /* status_test.cc */; }; + 7A7C3C9D9157BECA57BFA3BB /* PipelineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C6090E5C6820BB78C1C548B /* PipelineTests.swift */; }; 7A7DB86955670B85B4514A1F /* Validation_BloomFilterTest_MD5_1_0001_bloom_filter_proto.json in Resources */ = {isa = PBXBuildFile; fileRef = 4B59C0A7B2A4548496ED4E7D /* Validation_BloomFilterTest_MD5_1_0001_bloom_filter_proto.json */; }; 7A7EC216A0015D7620B4FF3E /* string_format_apple_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFD366B783AE27B9E79EE7A /* string_format_apple_test.mm */; }; 7A8DF35E7DB4278E67E6BDB3 /* snapshot_version_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = ABA495B9202B7E79008A7851 /* snapshot_version_test.cc */; }; @@ -1584,10 +1585,12 @@ F481368DB694B3B4D0C8E4A2 /* query_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B9C261C26C5D311E1E3C0CB9 /* query_test.cc */; }; F4F00BF4E87D7F0F0F8831DB /* FSTEventAccumulator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0392021401F00B64F25 /* FSTEventAccumulator.mm */; }; F4FAC5A7D40A0A9A3EA77998 /* FSTLevelDBSpecTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E02C20213FFB00B64F25 /* FSTLevelDBSpecTests.mm */; }; + F55640F419C95EB73BA718D4 /* PipelineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C6090E5C6820BB78C1C548B /* PipelineTests.swift */; }; F563446799EFCF4916758E6C /* Validation_BloomFilterTest_MD5_50000_01_bloom_filter_proto.json in Resources */ = {isa = PBXBuildFile; fileRef = 7B44DD11682C4803B73DCC34 /* Validation_BloomFilterTest_MD5_50000_01_bloom_filter_proto.json */; }; F56E9334642C207D7D85D428 /* pretty_printing_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB323F9553050F4F6490F9FF /* pretty_printing_test.cc */; }; F58A23FEF328EB74F681FE83 /* index_manager_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AE4A9E38D65688EE000EE2A1 /* index_manager_test.cc */; }; F5A654E92FF6F3FF16B93E6B /* mutation_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = C8522DE226C467C54E6788D8 /* mutation_test.cc */; }; + F5A67E6FF3F630C9D4C2EE98 /* PipelineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C6090E5C6820BB78C1C548B /* PipelineTests.swift */; }; F5B1F219E912F645FB79D08E /* firebase_app_check_credentials_provider_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = F119BDDF2F06B3C0883B8297 /* firebase_app_check_credentials_provider_test.mm */; }; F5BDECEB3B43BD1591EEADBD /* FSTUserDataReaderTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8D9892F204959C50613F16C8 /* FSTUserDataReaderTests.mm */; }; F6079BFC9460B190DA85C2E6 /* pretty_printing_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB323F9553050F4F6490F9FF /* pretty_printing_test.cc */; }; @@ -1749,6 +1752,7 @@ 3841925AA60E13A027F565E6 /* Validation_BloomFilterTest_MD5_50000_1_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_50000_1_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_50000_1_membership_test_result.json; sourceTree = ""; }; 395E8B07639E69290A929695 /* index.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = index.pb.cc; path = admin/index.pb.cc; sourceTree = ""; }; 3B843E4A1F3930A400548890 /* remote_store_spec_test.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = remote_store_spec_test.json; sourceTree = ""; }; + 3C6090E5C6820BB78C1C548B /* PipelineTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PipelineTests.swift; sourceTree = ""; }; 3CAA33F964042646FDDAF9F9 /* status_testing.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = status_testing.cc; sourceTree = ""; }; 3D050936A2D52257FD17FB6E /* md5_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = md5_test.cc; sourceTree = ""; }; 3E26017832D28D24F2E391C5 /* Pods-Firestore_Example_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_iOS.release.xcconfig"; path = "Target Support Files/Pods-Firestore_Example_iOS/Pods-Firestore_Example_iOS.release.xcconfig"; sourceTree = ""; }; @@ -1761,7 +1765,7 @@ 4334F87873015E3763954578 /* status_testing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = status_testing.h; sourceTree = ""; }; 4375BDCDBCA9938C7F086730 /* Validation_BloomFilterTest_MD5_5000_1_bloom_filter_proto.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_5000_1_bloom_filter_proto.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_5000_1_bloom_filter_proto.json; sourceTree = ""; }; 444B7AB3F5A2929070CB1363 /* hard_assert_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = hard_assert_test.cc; sourceTree = ""; }; - 4564AD9C55EC39C080EB9476 /* globals_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; path = globals_cache_test.cc; sourceTree = ""; }; + 4564AD9C55EC39C080EB9476 /* globals_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = globals_cache_test.cc; sourceTree = ""; }; 46E38E88A7A020F4E721E373 /* Pods_Firestore_Tests_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Tests_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 478DC75A0DCA6249A616DD30 /* Validation_BloomFilterTest_MD5_500_0001_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_500_0001_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_500_0001_membership_test_result.json; sourceTree = ""; }; 48D0915834C3D234E5A875A9 /* grpc_stream_tester.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = grpc_stream_tester.h; sourceTree = ""; }; @@ -1881,7 +1885,7 @@ 5B5414D28802BC76FDADABD6 /* stream_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = stream_test.cc; sourceTree = ""; }; 5B96CC29E9946508F022859C /* Validation_BloomFilterTest_MD5_50000_0001_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_50000_0001_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_50000_0001_membership_test_result.json; sourceTree = ""; }; 5C68EE4CB94C0DD6E333F546 /* Validation_BloomFilterTest_MD5_1_01_membership_test_result.json */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json; name = Validation_BloomFilterTest_MD5_1_01_membership_test_result.json; path = bloom_filter_golden_test_data/Validation_BloomFilterTest_MD5_1_01_membership_test_result.json; sourceTree = ""; }; - 5C6DEA63FBDE19D841291723 /* memory_globals_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; path = memory_globals_cache_test.cc; sourceTree = ""; }; + 5C6DEA63FBDE19D841291723 /* memory_globals_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = memory_globals_cache_test.cc; sourceTree = ""; }; 5C7942B6244F4C416B11B86C /* leveldb_mutation_queue_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = leveldb_mutation_queue_test.cc; sourceTree = ""; }; 5CAE131920FFFED600BE9A4A /* Firestore_Benchmarks_iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Firestore_Benchmarks_iOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 5CAE131D20FFFED600BE9A4A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -2124,7 +2128,7 @@ F8043813A5D16963EC02B182 /* local_serializer_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = local_serializer_test.cc; sourceTree = ""; }; F848C41C03A25C42AD5A4BC2 /* target_cache_test.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = target_cache_test.h; sourceTree = ""; }; F869D85E900E5AF6CD02E2FC /* firebase_auth_credentials_provider_test.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = firebase_auth_credentials_provider_test.mm; path = credentials/firebase_auth_credentials_provider_test.mm; sourceTree = ""; }; - FC44D934D4A52C790659C8D6 /* leveldb_globals_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; path = leveldb_globals_cache_test.cc; sourceTree = ""; }; + FC44D934D4A52C790659C8D6 /* leveldb_globals_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = leveldb_globals_cache_test.cc; sourceTree = ""; }; FF73B39D04D1760190E6B84A /* FIRQueryUnitTests.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRQueryUnitTests.mm; sourceTree = ""; }; FFCA39825D9678A03D1845D0 /* document_overlay_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = document_overlay_cache_test.cc; sourceTree = ""; }; /* End PBXFileReference section */ @@ -2254,6 +2258,7 @@ 124C932B22C1642C00CA8C2D /* CodableIntegrationTests.swift */, 3355BE9391CC4857AF0BDAE3 /* DatabaseTests.swift */, 62E54B832A9E910A003347C8 /* IndexingTests.swift */, + 3C6090E5C6820BB78C1C548B /* PipelineTests.swift */, 621D620928F9CE7400D2FA26 /* QueryIntegrationTests.swift */, 4D65F6E69993611D47DC8E7C /* SnapshotListenerSourceTests.swift */, EFF22EA92C5060A4009A369B /* VectorIntegrationTests.swift */, @@ -2911,7 +2916,6 @@ B73A76105FCE98FF8B521BA2 /* Pods-Firestore_Tests_tvOS.debug.xcconfig */, 4A67C88EC98B1BBD4615BB12 /* Pods-Firestore_Tests_tvOS.release.xcconfig */, ); - name = Pods; path = Pods; sourceTree = ""; }; @@ -4646,6 +4650,7 @@ 432056C4D1259F76C80FC2A8 /* FSTUserDataReaderTests.mm in Sources */, 3B1E27D951407FD237E64D07 /* FirestoreEncoderTests.swift in Sources */, 62E54B862A9E910B003347C8 /* IndexingTests.swift in Sources */, + 7A7C3C9D9157BECA57BFA3BB /* PipelineTests.swift in Sources */, 621D620C28F9CE7400D2FA26 /* QueryIntegrationTests.swift in Sources */, 1CFBD4563960D8A20C4679A3 /* SnapshotListenerSourceTests.swift in Sources */, EFF22EAC2C5060A4009A369B /* VectorIntegrationTests.swift in Sources */, @@ -4891,6 +4896,7 @@ 75A176239B37354588769206 /* FSTUserDataReaderTests.mm in Sources */, 5E89B1A5A5430713C79C4854 /* FirestoreEncoderTests.swift in Sources */, 62E54B852A9E910B003347C8 /* IndexingTests.swift in Sources */, + F55640F419C95EB73BA718D4 /* PipelineTests.swift in Sources */, 621D620B28F9CE7400D2FA26 /* QueryIntegrationTests.swift in Sources */, A0BC30D482B0ABD1A3A24CDC /* SnapshotListenerSourceTests.swift in Sources */, EFF22EAB2C5060A4009A369B /* VectorIntegrationTests.swift in Sources */, @@ -5386,6 +5392,7 @@ F5BDECEB3B43BD1591EEADBD /* FSTUserDataReaderTests.mm in Sources */, 6F45846C159D3C063DBD3CBE /* FirestoreEncoderTests.swift in Sources */, 62E54B842A9E910B003347C8 /* IndexingTests.swift in Sources */, + F5A67E6FF3F630C9D4C2EE98 /* PipelineTests.swift in Sources */, 621D620A28F9CE7400D2FA26 /* QueryIntegrationTests.swift in Sources */, B00F8D1819EE20C45B660940 /* SnapshotListenerSourceTests.swift in Sources */, EFF22EAA2C5060A4009A369B /* VectorIntegrationTests.swift in Sources */, @@ -5975,6 +5982,7 @@ ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ""; SDKROOT = iphoneos; + SWIFT_OBJC_INTEROP_MODE = objcxx; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 13.0; }; @@ -6024,6 +6032,7 @@ OTHER_CFLAGS = ""; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OBJC_INTEROP_MODE = objcxx; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 13.0; VALIDATE_PRODUCT = YES; diff --git a/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_iOS.xcscheme b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_iOS.xcscheme index f4896bc192e..bae10f26115 100644 --- a/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_iOS.xcscheme +++ b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_iOS.xcscheme @@ -54,6 +54,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + enableAddressSanitizer = "YES" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Firestore/Source/API/FIRCallbackWrapper.mm b/Firestore/Source/API/FIRCallbackWrapper.mm index 1681c6642eb..68275613b5d 100644 --- a/Firestore/Source/API/FIRCallbackWrapper.mm +++ b/Firestore/Source/API/FIRCallbackWrapper.mm @@ -34,10 +34,9 @@ @implementation FIRCallbackWrapper -+ (PipelineSnapshotListener) - wrapPipelineCallback:(std::shared_ptr)firestore - completion:(void (^)(std::shared_ptr> result, - NSError *_Nullable error))completion { ++ (PipelineSnapshotListener)wrapPipelineCallback:(std::shared_ptr)firestore + completion:(void (^)(PipelineResultVector result, + NSError *_Nullable error))completion { class Converter : public EventListener> { public: explicit Converter(std::shared_ptr firestore, PipelineBlock completion) @@ -47,11 +46,10 @@ explicit Converter(std::shared_ptr firestore, PipelineBlock comp void OnEvent(StatusOr> maybe_snapshot) override { if (maybe_snapshot.ok()) { completion_( - std::make_shared>( - std::initializer_list{PipelineResult::GetTestResult(firestore_)}), + std::initializer_list{PipelineResult::GetTestResult(firestore_)}, nullptr); } else { - completion_(nullptr, MakeNSError(maybe_snapshot.status())); + completion_(std::initializer_list{}, MakeNSError(maybe_snapshot.status())); } } diff --git a/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h b/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h index d5ae24f1602..2ade475d2d2 100644 --- a/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h +++ b/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h @@ -38,11 +38,10 @@ namespace core = firebase::firestore::core; NS_ASSUME_NONNULL_BEGIN -typedef void (^PipelineBlock)(std::shared_ptr> result, - NSError *_Nullable error) +typedef void (^PipelineBlock)(std::vector result, NSError *_Nullable error) NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead."); -typedef std::shared_ptr> PipelineResultVectorPtr; +typedef std::vector PipelineResultVector; NS_SWIFT_SENDABLE NS_SWIFT_NAME(CallbackWrapper) @@ -54,9 +53,8 @@ NS_SWIFT_NAME(CallbackWrapper) // thread safety. + (std::unique_ptr>>) wrapPipelineCallback:(std::shared_ptr)firestore - completion:(void (^NS_SWIFT_SENDABLE)( - std::shared_ptr> result, - NSError *_Nullable error))completion + completion:(void (^NS_SWIFT_SENDABLE)(PipelineResultVector result, + NSError *_Nullable error))completion NS_SWIFT_NAME(wrapPipelineCallback(firestore:completion:)); @end diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift index 62dbd721859..0e084f4a4af 100644 --- a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift +++ b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift @@ -24,13 +24,13 @@ public struct PipelineResult { cppObj = cppSource } - static func convertToArrayFromCppVector(_ vectorPtr: PipelineResultVectorPtr) + static func convertToArrayFromCppVector(_ vector: PipelineResultVector) -> [PipelineResult] { // Create a Swift array and populate it by iterating over the C++ vector var swiftArray: [PipelineResult] = [] - for index in vectorPtr.pointee.indices { - let cppResult = vectorPtr.pointee[index] + for index in vector.indices { + let cppResult = vector[index] swiftArray.append(PipelineResult(cppResult)) } diff --git a/Firestore/Swift/Tests/Integration/PipelineTests.swift b/Firestore/Swift/Tests/Integration/PipelineTests.swift new file mode 100644 index 00000000000..ff12c519f66 --- /dev/null +++ b/Firestore/Swift/Tests/Integration/PipelineTests.swift @@ -0,0 +1,26 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import Foundation +import XCTest + +import FirebaseFirestore + +final class PipelineTests: FSTIntegrationTestCase { + func testCreatePipeline() async throws { + let pipelineSource: PipelineSource = db.pipeline() + let pipeline: Pipeline = pipelineSource.GetCollection("path") + let _: [PipelineResult] = try await pipeline.GetPipelineResult() + } +} diff --git a/Firestore/core/src/api/firestore.cc b/Firestore/core/src/api/firestore.cc index 23152b5c444..d4d5bea4e60 100644 --- a/Firestore/core/src/api/firestore.cc +++ b/Firestore/core/src/api/firestore.cc @@ -228,7 +228,8 @@ void Firestore::SetClientLanguage(std::string language_token) { } PipelineSource Firestore::pipeline() { - return {shared_from_this()}; + EnsureClientConfigured(); + return PipelineSource(shared_from_this()); } std::unique_ptr Firestore::AddSnapshotsInSyncListener( From 3fc8a15f02f6f39a0c1a1076631e922b52f85cab Mon Sep 17 00:00:00 2001 From: wu-hui <53845758+wu-hui@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:31:26 -0500 Subject: [PATCH 27/30] shared_ptr instead of unique_ptr (#14353) --- .gitignore | 2 ++ Firestore/Protos/nanopb/firestore/bundle.nanopb.cc | 2 +- Firestore/Protos/nanopb/firestore/bundle.nanopb.h | 2 +- .../Protos/nanopb/firestore/local/maybe_document.nanopb.cc | 2 +- Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h | 2 +- Firestore/Protos/nanopb/firestore/local/mutation.nanopb.cc | 2 +- Firestore/Protos/nanopb/firestore/local/mutation.nanopb.h | 2 +- Firestore/Protos/nanopb/firestore/local/target.nanopb.cc | 2 +- Firestore/Protos/nanopb/firestore/local/target.nanopb.h | 2 +- Firestore/Protos/nanopb/google/api/annotations.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/api/annotations.nanopb.h | 2 +- Firestore/Protos/nanopb/google/api/http.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/api/http.nanopb.h | 2 +- Firestore/Protos/nanopb/google/api/resource.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/api/resource.nanopb.h | 2 +- Firestore/Protos/nanopb/google/firestore/admin/index.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/firestore/admin/index.nanopb.h | 2 +- .../nanopb/google/firestore/v1/aggregation_result.nanopb.cc | 2 +- .../nanopb/google/firestore/v1/aggregation_result.nanopb.h | 2 +- .../Protos/nanopb/google/firestore/v1/bloom_filter.nanopb.cc | 2 +- .../Protos/nanopb/google/firestore/v1/bloom_filter.nanopb.h | 2 +- Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.h | 2 +- Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h | 2 +- Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.h | 2 +- Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.h | 2 +- Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.h | 2 +- Firestore/Protos/nanopb/google/protobuf/any.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/protobuf/any.nanopb.h | 2 +- Firestore/Protos/nanopb/google/protobuf/empty.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/protobuf/empty.nanopb.h | 2 +- Firestore/Protos/nanopb/google/protobuf/struct.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/protobuf/struct.nanopb.h | 2 +- Firestore/Protos/nanopb/google/protobuf/timestamp.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/protobuf/timestamp.nanopb.h | 2 +- Firestore/Protos/nanopb/google/protobuf/wrappers.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/protobuf/wrappers.nanopb.h | 2 +- Firestore/Protos/nanopb/google/rpc/status.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/rpc/status.nanopb.h | 2 +- Firestore/Protos/nanopb/google/type/latlng.nanopb.cc | 2 +- Firestore/Protos/nanopb/google/type/latlng.nanopb.h | 2 +- Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h | 2 +- Firestore/core/interfaceForSwift/api/pipeline.h | 2 +- 47 files changed, 48 insertions(+), 46 deletions(-) diff --git a/.gitignore b/.gitignore index dc909fe4338..28f294853d5 100644 --- a/.gitignore +++ b/.gitignore @@ -157,6 +157,8 @@ FirebaseAppCheck/Apps/AppCheckCustomProvideApp/AppCheckCustomProvideApp/GoogleSe /Example/FirestoreSample/firebase-debug.log # generated Terraform docs +Firestore/.terraform/* +Firestore/.terraform.lock.hcl .terraform/* .terraform.lock.hcl *.tfstate diff --git a/Firestore/Protos/nanopb/firestore/bundle.nanopb.cc b/Firestore/Protos/nanopb/firestore/bundle.nanopb.cc index 6e15969980e..f470145f1ad 100644 --- a/Firestore/Protos/nanopb/firestore/bundle.nanopb.cc +++ b/Firestore/Protos/nanopb/firestore/bundle.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/firestore/bundle.nanopb.h b/Firestore/Protos/nanopb/firestore/bundle.nanopb.h index 872ea118504..bb312068857 100644 --- a/Firestore/Protos/nanopb/firestore/bundle.nanopb.h +++ b/Firestore/Protos/nanopb/firestore/bundle.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.cc b/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.cc index 2f906d9f95d..f145a4a81b8 100644 --- a/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.cc +++ b/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h b/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h index 53762bb101f..a6373161785 100644 --- a/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h +++ b/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.cc b/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.cc index 1a06d56941d..55f9a23489e 100644 --- a/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.cc +++ b/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.h b/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.h index 28430465212..b316ea582b9 100644 --- a/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.h +++ b/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/firestore/local/target.nanopb.cc b/Firestore/Protos/nanopb/firestore/local/target.nanopb.cc index cd73d9344f7..7d0d51ab579 100644 --- a/Firestore/Protos/nanopb/firestore/local/target.nanopb.cc +++ b/Firestore/Protos/nanopb/firestore/local/target.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/firestore/local/target.nanopb.h b/Firestore/Protos/nanopb/firestore/local/target.nanopb.h index 7dedb4d91eb..34f926f3ea0 100644 --- a/Firestore/Protos/nanopb/firestore/local/target.nanopb.h +++ b/Firestore/Protos/nanopb/firestore/local/target.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/api/annotations.nanopb.cc b/Firestore/Protos/nanopb/google/api/annotations.nanopb.cc index b755cad4926..c0bc8de7cdf 100644 --- a/Firestore/Protos/nanopb/google/api/annotations.nanopb.cc +++ b/Firestore/Protos/nanopb/google/api/annotations.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/api/annotations.nanopb.h b/Firestore/Protos/nanopb/google/api/annotations.nanopb.h index 4ddc9010007..46f6d833985 100644 --- a/Firestore/Protos/nanopb/google/api/annotations.nanopb.h +++ b/Firestore/Protos/nanopb/google/api/annotations.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/api/http.nanopb.cc b/Firestore/Protos/nanopb/google/api/http.nanopb.cc index b69f3495d6f..6be59e2b5b8 100644 --- a/Firestore/Protos/nanopb/google/api/http.nanopb.cc +++ b/Firestore/Protos/nanopb/google/api/http.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/api/http.nanopb.h b/Firestore/Protos/nanopb/google/api/http.nanopb.h index 5d97d74d221..af98141f2c4 100644 --- a/Firestore/Protos/nanopb/google/api/http.nanopb.h +++ b/Firestore/Protos/nanopb/google/api/http.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/api/resource.nanopb.cc b/Firestore/Protos/nanopb/google/api/resource.nanopb.cc index 82456fe0cc8..852f7122473 100644 --- a/Firestore/Protos/nanopb/google/api/resource.nanopb.cc +++ b/Firestore/Protos/nanopb/google/api/resource.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/api/resource.nanopb.h b/Firestore/Protos/nanopb/google/api/resource.nanopb.h index 7c7c1ffabaa..741cc580045 100644 --- a/Firestore/Protos/nanopb/google/api/resource.nanopb.h +++ b/Firestore/Protos/nanopb/google/api/resource.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/admin/index.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/admin/index.nanopb.cc index 5769d63aec7..acf9ce034d4 100644 --- a/Firestore/Protos/nanopb/google/firestore/admin/index.nanopb.cc +++ b/Firestore/Protos/nanopb/google/firestore/admin/index.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/admin/index.nanopb.h b/Firestore/Protos/nanopb/google/firestore/admin/index.nanopb.h index e9ba3c9cb86..9caefad8c54 100644 --- a/Firestore/Protos/nanopb/google/firestore/admin/index.nanopb.h +++ b/Firestore/Protos/nanopb/google/firestore/admin/index.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/aggregation_result.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1/aggregation_result.nanopb.cc index 5a740ffd8be..6b6dfe77b90 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/aggregation_result.nanopb.cc +++ b/Firestore/Protos/nanopb/google/firestore/v1/aggregation_result.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/aggregation_result.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1/aggregation_result.nanopb.h index a64f9163853..0bed00bba6d 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/aggregation_result.nanopb.h +++ b/Firestore/Protos/nanopb/google/firestore/v1/aggregation_result.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/bloom_filter.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1/bloom_filter.nanopb.cc index 3ce3049039a..e30c4b9613f 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/bloom_filter.nanopb.cc +++ b/Firestore/Protos/nanopb/google/firestore/v1/bloom_filter.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/bloom_filter.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1/bloom_filter.nanopb.h index 0f294a9b9e1..e46bb381ada 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/bloom_filter.nanopb.h +++ b/Firestore/Protos/nanopb/google/firestore/v1/bloom_filter.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.cc index 26c423266d4..f3b4bed3ff7 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.cc +++ b/Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.h index 7772c08f7df..b63ff25e66e 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.h +++ b/Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.cc index f236b603132..d7b202a19a8 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.cc +++ b/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h index 6a6435c05a3..05bf35cc93c 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h +++ b/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.cc index 233d2025dc9..326b3959518 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.cc +++ b/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.h index 3dd603a5b09..c513fd0dfec 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.h +++ b/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.cc index decd34e2ca2..ca3ce6c85d6 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.cc +++ b/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.h index cac63add141..b54d343853f 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.h +++ b/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.cc index d423c292d4a..1f4a31bb164 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.cc +++ b/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.h index 0db9c6d2874..9fd6d1688bd 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.h +++ b/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/protobuf/any.nanopb.cc b/Firestore/Protos/nanopb/google/protobuf/any.nanopb.cc index 2a57547086a..5efdaf04dd4 100644 --- a/Firestore/Protos/nanopb/google/protobuf/any.nanopb.cc +++ b/Firestore/Protos/nanopb/google/protobuf/any.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/protobuf/any.nanopb.h b/Firestore/Protos/nanopb/google/protobuf/any.nanopb.h index c06c82ca2db..5a418826834 100644 --- a/Firestore/Protos/nanopb/google/protobuf/any.nanopb.h +++ b/Firestore/Protos/nanopb/google/protobuf/any.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/protobuf/empty.nanopb.cc b/Firestore/Protos/nanopb/google/protobuf/empty.nanopb.cc index ea00f4e2640..bc43bb31233 100644 --- a/Firestore/Protos/nanopb/google/protobuf/empty.nanopb.cc +++ b/Firestore/Protos/nanopb/google/protobuf/empty.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/protobuf/empty.nanopb.h b/Firestore/Protos/nanopb/google/protobuf/empty.nanopb.h index be77b64f2b7..5820d750a0d 100644 --- a/Firestore/Protos/nanopb/google/protobuf/empty.nanopb.h +++ b/Firestore/Protos/nanopb/google/protobuf/empty.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/protobuf/struct.nanopb.cc b/Firestore/Protos/nanopb/google/protobuf/struct.nanopb.cc index 1eeb1d963c8..9cc956eb61a 100644 --- a/Firestore/Protos/nanopb/google/protobuf/struct.nanopb.cc +++ b/Firestore/Protos/nanopb/google/protobuf/struct.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/protobuf/struct.nanopb.h b/Firestore/Protos/nanopb/google/protobuf/struct.nanopb.h index 086fabdc900..9fa79620456 100644 --- a/Firestore/Protos/nanopb/google/protobuf/struct.nanopb.h +++ b/Firestore/Protos/nanopb/google/protobuf/struct.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/protobuf/timestamp.nanopb.cc b/Firestore/Protos/nanopb/google/protobuf/timestamp.nanopb.cc index d45c5991ef4..cfa685b724e 100644 --- a/Firestore/Protos/nanopb/google/protobuf/timestamp.nanopb.cc +++ b/Firestore/Protos/nanopb/google/protobuf/timestamp.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/protobuf/timestamp.nanopb.h b/Firestore/Protos/nanopb/google/protobuf/timestamp.nanopb.h index a094a954fbc..d5757078e51 100644 --- a/Firestore/Protos/nanopb/google/protobuf/timestamp.nanopb.h +++ b/Firestore/Protos/nanopb/google/protobuf/timestamp.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/protobuf/wrappers.nanopb.cc b/Firestore/Protos/nanopb/google/protobuf/wrappers.nanopb.cc index e9832439ffc..a6f03ac797b 100644 --- a/Firestore/Protos/nanopb/google/protobuf/wrappers.nanopb.cc +++ b/Firestore/Protos/nanopb/google/protobuf/wrappers.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/protobuf/wrappers.nanopb.h b/Firestore/Protos/nanopb/google/protobuf/wrappers.nanopb.h index 7efae8dc674..98da8de2209 100644 --- a/Firestore/Protos/nanopb/google/protobuf/wrappers.nanopb.h +++ b/Firestore/Protos/nanopb/google/protobuf/wrappers.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/rpc/status.nanopb.cc b/Firestore/Protos/nanopb/google/rpc/status.nanopb.cc index b71c001f277..cf7cc2768d9 100644 --- a/Firestore/Protos/nanopb/google/rpc/status.nanopb.cc +++ b/Firestore/Protos/nanopb/google/rpc/status.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/rpc/status.nanopb.h b/Firestore/Protos/nanopb/google/rpc/status.nanopb.h index cadd9ece3a0..bd59ff0a20e 100644 --- a/Firestore/Protos/nanopb/google/rpc/status.nanopb.h +++ b/Firestore/Protos/nanopb/google/rpc/status.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/type/latlng.nanopb.cc b/Firestore/Protos/nanopb/google/type/latlng.nanopb.cc index f6b9e6870e3..378c66500bf 100644 --- a/Firestore/Protos/nanopb/google/type/latlng.nanopb.cc +++ b/Firestore/Protos/nanopb/google/type/latlng.nanopb.cc @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Protos/nanopb/google/type/latlng.nanopb.h b/Firestore/Protos/nanopb/google/type/latlng.nanopb.h index 2daf244dd19..1e78b1896ca 100644 --- a/Firestore/Protos/nanopb/google/type/latlng.nanopb.h +++ b/Firestore/Protos/nanopb/google/type/latlng.nanopb.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h b/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h index 2ade475d2d2..08a9b9713dd 100644 --- a/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h +++ b/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h @@ -51,7 +51,7 @@ NS_SWIFT_NAME(CallbackWrapper) // are invoked on a different thread than the one they were originally defined in. If this callback // is expected to be called on a different thread, it should be marked as `Sendable` to ensure // thread safety. -+ (std::unique_ptr>>) ++ (std::shared_ptr>>) wrapPipelineCallback:(std::shared_ptr)firestore completion:(void (^NS_SWIFT_SENDABLE)(PipelineResultVector result, NSError *_Nullable error))completion diff --git a/Firestore/core/interfaceForSwift/api/pipeline.h b/Firestore/core/interfaceForSwift/api/pipeline.h index 3a693e9880f..ff963af0efe 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline.h +++ b/Firestore/core/interfaceForSwift/api/pipeline.h @@ -35,7 +35,7 @@ class Firestore; class PipelineResult; using PipelineSnapshotListener = - std::unique_ptr>>; + std::shared_ptr>>; class Pipeline { public: From 499bcb4f2f1904fd176b0eaf10f62ade157fcb62 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Wed, 22 Jan 2025 15:46:53 -0500 Subject: [PATCH 28/30] Use workaround to fix double free error --- .../Firestore_IntegrationTests_iOS.xcscheme | 8 ++++++++ Firestore/Source/API/FIRCallbackWrapper.mm | 20 +++++++++++-------- .../FirebaseFirestore/FIRCallbackWrapper.h | 10 +++++----- .../Swift/Source/SwiftAPI/Pipeline.swift | 5 ++--- .../Source/SwiftAPI/PipelineResult.swift | 10 +++++----- .../Tests/Integration/PipelineTests.swift | 2 +- .../core/interfaceForSwift/api/pipeline.cc | 6 ++++-- .../core/interfaceForSwift/api/pipeline.h | 2 +- .../interfaceForSwift/api/pipeline_result.cc | 4 +++- 9 files changed, 41 insertions(+), 26 deletions(-) diff --git a/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_iOS.xcscheme b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_iOS.xcscheme index bae10f26115..08b9daf7407 100644 --- a/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_iOS.xcscheme +++ b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_iOS.xcscheme @@ -27,6 +27,7 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES" + enableAddressSanitizer = "YES" enableASanStackUseAfterReturn = "YES"> + + + + diff --git a/Firestore/Source/API/FIRCallbackWrapper.mm b/Firestore/Source/API/FIRCallbackWrapper.mm index 68275613b5d..0acfcba193a 100644 --- a/Firestore/Source/API/FIRCallbackWrapper.mm +++ b/Firestore/Source/API/FIRCallbackWrapper.mm @@ -34,22 +34,26 @@ @implementation FIRCallbackWrapper +// In public Swift documentation for integrating Swift and C++, using raw pointers in C++ is +// generally considered unsafe. However, during an experiment where the result was passed as a value +// instead of a pointer, a double free error occurred. This issue could not be traced effectively +// because the implementation resides within the Swift-C++ transition layer. In this specific use +// case, the C++ OnEvent() scope is destroyed after the Swift callback has been destroyed. Due to +// this ordering, using a raw pointer is a safe workaround for now. + (PipelineSnapshotListener)wrapPipelineCallback:(std::shared_ptr)firestore - completion:(void (^)(PipelineResultVector result, + completion:(void (^)(CppPipelineResult *_Nullable result, NSError *_Nullable error))completion { - class Converter : public EventListener> { + class Converter : public EventListener { public: explicit Converter(std::shared_ptr firestore, PipelineBlock completion) : firestore_(firestore), completion_(completion) { } - void OnEvent(StatusOr> maybe_snapshot) override { + void OnEvent(StatusOr maybe_snapshot) override { if (maybe_snapshot.ok()) { - completion_( - std::initializer_list{PipelineResult::GetTestResult(firestore_)}, - nullptr); + completion_(&maybe_snapshot.ValueOrDie(), nullptr); } else { - completion_(std::initializer_list{}, MakeNSError(maybe_snapshot.status())); + completion_(nullptr, MakeNSError(maybe_snapshot.status())); } } @@ -58,7 +62,7 @@ void OnEvent(StatusOr> maybe_snapshot) override { PipelineBlock completion_; }; - return absl::make_unique(firestore, completion); + return std::make_shared(firestore, completion); } @end diff --git a/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h b/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h index 08a9b9713dd..f832f737525 100644 --- a/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h +++ b/Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h @@ -38,10 +38,10 @@ namespace core = firebase::firestore::core; NS_ASSUME_NONNULL_BEGIN -typedef void (^PipelineBlock)(std::vector result, NSError *_Nullable error) - NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead."); +typedef api::PipelineResult CppPipelineResult; -typedef std::vector PipelineResultVector; +typedef void (^PipelineBlock)(CppPipelineResult *_Nullable result, NSError *_Nullable error) + NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead."); NS_SWIFT_SENDABLE NS_SWIFT_NAME(CallbackWrapper) @@ -51,9 +51,9 @@ NS_SWIFT_NAME(CallbackWrapper) // are invoked on a different thread than the one they were originally defined in. If this callback // is expected to be called on a different thread, it should be marked as `Sendable` to ensure // thread safety. -+ (std::shared_ptr>>) ++ (std::shared_ptr>) wrapPipelineCallback:(std::shared_ptr)firestore - completion:(void (^NS_SWIFT_SENDABLE)(PipelineResultVector result, + completion:(void (^NS_SWIFT_SENDABLE)(CppPipelineResult *_Nullable result, NSError *_Nullable error))completion NS_SWIFT_NAME(wrapPipelineCallback(firestore:completion:)); diff --git a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift index 26e1e342783..640ecdfb278 100644 --- a/Firestore/Swift/Source/SwiftAPI/Pipeline.swift +++ b/Firestore/Swift/Source/SwiftAPI/Pipeline.swift @@ -29,15 +29,14 @@ public struct Pipeline { } @discardableResult - public func GetPipelineResult() async throws -> [PipelineResult] { + public func GetPipelineResult() async throws -> PipelineResult { return try await withCheckedThrowingContinuation { continuation in let listener = CallbackWrapper.wrapPipelineCallback(firestore: cppObj.GetFirestore()) { result, error in if let error { continuation.resume(throwing: error) } else { - // Our callbacks guarantee that we either return an error or a progress event. - continuation.resume(returning: PipelineResult.convertToArrayFromCppVector(result)) + continuation.resume(returning: PipelineResult(result!.pointee)) } } cppObj.GetPipelineResult(listener) diff --git a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift index 0e084f4a4af..52ca87b9774 100644 --- a/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift +++ b/Firestore/Swift/Source/SwiftAPI/PipelineResult.swift @@ -24,15 +24,15 @@ public struct PipelineResult { cppObj = cppSource } - static func convertToArrayFromCppVector(_ vector: PipelineResultVector) + static func convertToArrayFromCppVector(_ vector: CppPipelineResult) -> [PipelineResult] { // Create a Swift array and populate it by iterating over the C++ vector var swiftArray: [PipelineResult] = [] - for index in vector.indices { - let cppResult = vector[index] - swiftArray.append(PipelineResult(cppResult)) - } +// for index in vector.indices { +// let cppResult = vector[index] +// swiftArray.append(PipelineResult(cppResult)) +// } return swiftArray } diff --git a/Firestore/Swift/Tests/Integration/PipelineTests.swift b/Firestore/Swift/Tests/Integration/PipelineTests.swift index ff12c519f66..26f4c89716a 100644 --- a/Firestore/Swift/Tests/Integration/PipelineTests.swift +++ b/Firestore/Swift/Tests/Integration/PipelineTests.swift @@ -21,6 +21,6 @@ final class PipelineTests: FSTIntegrationTestCase { func testCreatePipeline() async throws { let pipelineSource: PipelineSource = db.pipeline() let pipeline: Pipeline = pipelineSource.GetCollection("path") - let _: [PipelineResult] = try await pipeline.GetPipelineResult() + let _ = try await pipeline.GetPipelineResult() } } diff --git a/Firestore/core/interfaceForSwift/api/pipeline.cc b/Firestore/core/interfaceForSwift/api/pipeline.cc index c1da06de449..c090857e0f2 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline.cc +++ b/Firestore/core/interfaceForSwift/api/pipeline.cc @@ -45,8 +45,10 @@ void Pipeline::GetPipelineResult(PipelineSnapshotListener callback) const { /*include_document_metadata_changes=*/true, /*wait_for_sync_when_online=*/true); - callback->OnEvent(StatusOr>( - {(PipelineResult::GetTestResult(firestore_))})); + PipelineResult sample = PipelineResult::GetTestResult(firestore_); + + StatusOr res(sample); + callback->OnEvent(res); // class ListenOnce : public EventListener> { // public: diff --git a/Firestore/core/interfaceForSwift/api/pipeline.h b/Firestore/core/interfaceForSwift/api/pipeline.h index ff963af0efe..2cc7fef45e8 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline.h +++ b/Firestore/core/interfaceForSwift/api/pipeline.h @@ -35,7 +35,7 @@ class Firestore; class PipelineResult; using PipelineSnapshotListener = - std::shared_ptr>>; + std::shared_ptr>; class Pipeline { public: diff --git a/Firestore/core/interfaceForSwift/api/pipeline_result.cc b/Firestore/core/interfaceForSwift/api/pipeline_result.cc index 7851c9aeeb8..d16b227988a 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline_result.cc +++ b/Firestore/core/interfaceForSwift/api/pipeline_result.cc @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "Firestore/core/interfaceForSwift/api/pipeline_result.h" +#include + #include "Firestore/core/include/firebase/firestore/timestamp.h" +#include "Firestore/core/interfaceForSwift/api/pipeline_result.h" namespace firebase { namespace firestore { From 757d5249278051dbf09ea72c062dadbf8f8779ce Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Thu, 23 Jan 2025 12:34:34 -0500 Subject: [PATCH 29/30] Rename cpp public header --- Firestore/Source/API/FIRCallbackWrapper.mm | 4 ++-- .../api/{collection_stage.cc => CollectionStage.cc} | 2 +- .../api/{collection_stage.h => CollectionStage.h} | 2 +- .../interfaceForSwift/api/FirebaseFirestoreCpp.h | 12 ++++++------ .../{firestore_pipeline.cc => FirestorePipeline.cc} | 2 +- .../{firestore_pipeline.h => FirestorePipeline.h} | 2 +- .../api/{pipeline.cc => Pipeline.cc} | 4 ++-- .../interfaceForSwift/api/{pipeline.h => Pipeline.h} | 4 ++-- .../api/{pipeline_result.cc => PipelineResult.cc} | 2 +- .../api/{pipeline_result.h => PipelineResult.h} | 0 .../api/{pipeline_source.cc => PipelineSource.cc} | 4 ++-- .../api/{pipeline_source.h => PipelineSource.h} | 2 +- .../interfaceForSwift/api/{stage.cc => Stage.cc} | 2 +- .../core/interfaceForSwift/api/{stage.h => Stage.h} | 0 Firestore/core/src/api/firestore.h | 2 +- 15 files changed, 22 insertions(+), 22 deletions(-) rename Firestore/core/interfaceForSwift/api/{collection_stage.cc => CollectionStage.cc} (93%) rename Firestore/core/interfaceForSwift/api/{collection_stage.h => CollectionStage.h} (98%) rename Firestore/core/interfaceForSwift/api/{firestore_pipeline.cc => FirestorePipeline.cc} (92%) rename Firestore/core/interfaceForSwift/api/{firestore_pipeline.h => FirestorePipeline.h} (97%) rename Firestore/core/interfaceForSwift/api/{pipeline.cc => Pipeline.cc} (96%) rename Firestore/core/interfaceForSwift/api/{pipeline.h => Pipeline.h} (96%) rename Firestore/core/interfaceForSwift/api/{pipeline_result.cc => PipelineResult.cc} (95%) rename Firestore/core/interfaceForSwift/api/{pipeline_result.h => PipelineResult.h} (100%) rename Firestore/core/interfaceForSwift/api/{pipeline_source.cc => PipelineSource.cc} (89%) rename Firestore/core/interfaceForSwift/api/{pipeline_source.h => PipelineSource.h} (98%) rename Firestore/core/interfaceForSwift/api/{stage.cc => Stage.cc} (92%) rename Firestore/core/interfaceForSwift/api/{stage.h => Stage.h} (100%) diff --git a/Firestore/Source/API/FIRCallbackWrapper.mm b/Firestore/Source/API/FIRCallbackWrapper.mm index 0acfcba193a..cf6a8aa0c8b 100644 --- a/Firestore/Source/API/FIRCallbackWrapper.mm +++ b/Firestore/Source/API/FIRCallbackWrapper.mm @@ -20,8 +20,8 @@ #include #include -#include "Firestore/core/interfaceForSwift/api/pipeline.h" -#include "Firestore/core/interfaceForSwift/api/pipeline_result.h" +#include "Firestore/core/interfaceForSwift/api/Pipeline.h" +#include "Firestore/core/interfaceForSwift/api/PipelineResult.h" #include "Firestore/core/src/core/event_listener.h" #include "Firestore/core/src/util/error_apple.h" #include "Firestore/core/src/util/statusor.h" diff --git a/Firestore/core/interfaceForSwift/api/collection_stage.cc b/Firestore/core/interfaceForSwift/api/CollectionStage.cc similarity index 93% rename from Firestore/core/interfaceForSwift/api/collection_stage.cc rename to Firestore/core/interfaceForSwift/api/CollectionStage.cc index 3a2654b6dc4..f8e5976a62e 100644 --- a/Firestore/core/interfaceForSwift/api/collection_stage.cc +++ b/Firestore/core/interfaceForSwift/api/CollectionStage.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "Firestore/core/interfaceForSwift/api/collection_stage.h" +#include "Firestore/core/interfaceForSwift/api/CollectionStage.h" #include namespace firebase { diff --git a/Firestore/core/interfaceForSwift/api/collection_stage.h b/Firestore/core/interfaceForSwift/api/CollectionStage.h similarity index 98% rename from Firestore/core/interfaceForSwift/api/collection_stage.h rename to Firestore/core/interfaceForSwift/api/CollectionStage.h index 28fe7590fa4..40537f711b4 100644 --- a/Firestore/core/interfaceForSwift/api/collection_stage.h +++ b/Firestore/core/interfaceForSwift/api/CollectionStage.h @@ -16,7 +16,7 @@ #define FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTION_STAGE_H_ #include -#include "stage.h" +#include "Stage.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/interfaceForSwift/api/FirebaseFirestoreCpp.h b/Firestore/core/interfaceForSwift/api/FirebaseFirestoreCpp.h index b5191cc4363..ed9cc6e6622 100644 --- a/Firestore/core/interfaceForSwift/api/FirebaseFirestoreCpp.h +++ b/Firestore/core/interfaceForSwift/api/FirebaseFirestoreCpp.h @@ -17,11 +17,11 @@ #ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIREBASEFIRESTORECPP_H_ #define FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIREBASEFIRESTORECPP_H_ -#import "collection_stage.h" -#import "firestore_pipeline.h" -#import "pipeline.h" -#import "pipeline_result.h" -#import "pipeline_source.h" -#import "stage.h" +#import "CollectionStage.h" +#import "FirestorePipeline.h" +#import "Pipeline.h" +#import "PipelineResult.h" +#import "PipelineSource.h" +#import "Stage.h" #endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIREBASEFIRESTORECPP_H_ diff --git a/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc b/Firestore/core/interfaceForSwift/api/FirestorePipeline.cc similarity index 92% rename from Firestore/core/interfaceForSwift/api/firestore_pipeline.cc rename to Firestore/core/interfaceForSwift/api/FirestorePipeline.cc index fabd05ad7cc..3d06f049eef 100644 --- a/Firestore/core/interfaceForSwift/api/firestore_pipeline.cc +++ b/Firestore/core/interfaceForSwift/api/FirestorePipeline.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "Firestore/core/interfaceForSwift/api/firestore_pipeline.h" +#include "Firestore/core/interfaceForSwift/api/FirestorePipeline.h" #include diff --git a/Firestore/core/interfaceForSwift/api/firestore_pipeline.h b/Firestore/core/interfaceForSwift/api/FirestorePipeline.h similarity index 97% rename from Firestore/core/interfaceForSwift/api/firestore_pipeline.h rename to Firestore/core/interfaceForSwift/api/FirestorePipeline.h index 7b246c3c87f..761375dd480 100644 --- a/Firestore/core/interfaceForSwift/api/firestore_pipeline.h +++ b/Firestore/core/interfaceForSwift/api/FirestorePipeline.h @@ -17,7 +17,7 @@ #include -#include "pipeline_source.h" +#include "PipelineSource.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/interfaceForSwift/api/pipeline.cc b/Firestore/core/interfaceForSwift/api/Pipeline.cc similarity index 96% rename from Firestore/core/interfaceForSwift/api/pipeline.cc rename to Firestore/core/interfaceForSwift/api/Pipeline.cc index c090857e0f2..520ad7d23fd 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline.cc +++ b/Firestore/core/interfaceForSwift/api/Pipeline.cc @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "Firestore/core/interfaceForSwift/api/pipeline.h" +#include "Firestore/core/interfaceForSwift/api/Pipeline.h" #include // NOLINT(build/c++11) #include #include "Firestore/core/include/firebase/firestore/timestamp.h" -#include "Firestore/core/interfaceForSwift/api/pipeline_result.h" +#include "Firestore/core/interfaceForSwift/api/PipelineResult.h" #include "Firestore/core/src/api/firestore.h" #include "Firestore/core/src/api/listener_registration.h" #include "Firestore/core/src/api/source.h" diff --git a/Firestore/core/interfaceForSwift/api/pipeline.h b/Firestore/core/interfaceForSwift/api/Pipeline.h similarity index 96% rename from Firestore/core/interfaceForSwift/api/pipeline.h rename to Firestore/core/interfaceForSwift/api/Pipeline.h index 2cc7fef45e8..cd718545b4a 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline.h +++ b/Firestore/core/interfaceForSwift/api/Pipeline.h @@ -18,8 +18,8 @@ #include #include #include -#include "pipeline_result.h" -#include "stage.h" +#include "PipelineResult.h" +#include "Stage.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/interfaceForSwift/api/pipeline_result.cc b/Firestore/core/interfaceForSwift/api/PipelineResult.cc similarity index 95% rename from Firestore/core/interfaceForSwift/api/pipeline_result.cc rename to Firestore/core/interfaceForSwift/api/PipelineResult.cc index d16b227988a..d8f8323645a 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline_result.cc +++ b/Firestore/core/interfaceForSwift/api/PipelineResult.cc @@ -15,7 +15,7 @@ #include #include "Firestore/core/include/firebase/firestore/timestamp.h" -#include "Firestore/core/interfaceForSwift/api/pipeline_result.h" +#include "Firestore/core/interfaceForSwift/api/PipelineResult.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/interfaceForSwift/api/pipeline_result.h b/Firestore/core/interfaceForSwift/api/PipelineResult.h similarity index 100% rename from Firestore/core/interfaceForSwift/api/pipeline_result.h rename to Firestore/core/interfaceForSwift/api/PipelineResult.h diff --git a/Firestore/core/interfaceForSwift/api/pipeline_source.cc b/Firestore/core/interfaceForSwift/api/PipelineSource.cc similarity index 89% rename from Firestore/core/interfaceForSwift/api/pipeline_source.cc rename to Firestore/core/interfaceForSwift/api/PipelineSource.cc index 9798577661e..f744a2cb15d 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline_source.cc +++ b/Firestore/core/interfaceForSwift/api/PipelineSource.cc @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "Firestore/core/interfaceForSwift/api/pipeline_source.h" +#include "Firestore/core/interfaceForSwift/api/PipelineSource.h" #include -#include "Firestore/core/interfaceForSwift/api/collection_stage.h" +#include "Firestore/core/interfaceForSwift/api/CollectionStage.h" #include "Firestore/core/src/api/document_reference.h" #include "Firestore/core/src/api/firestore.h" diff --git a/Firestore/core/interfaceForSwift/api/pipeline_source.h b/Firestore/core/interfaceForSwift/api/PipelineSource.h similarity index 98% rename from Firestore/core/interfaceForSwift/api/pipeline_source.h rename to Firestore/core/interfaceForSwift/api/PipelineSource.h index 7a1c91f35c3..0e49d6e06e7 100644 --- a/Firestore/core/interfaceForSwift/api/pipeline_source.h +++ b/Firestore/core/interfaceForSwift/api/PipelineSource.h @@ -19,7 +19,7 @@ #include #include -#include "pipeline.h" +#include "Pipeline.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/interfaceForSwift/api/stage.cc b/Firestore/core/interfaceForSwift/api/Stage.cc similarity index 92% rename from Firestore/core/interfaceForSwift/api/stage.cc rename to Firestore/core/interfaceForSwift/api/Stage.cc index 056e2576741..15a51380a50 100644 --- a/Firestore/core/interfaceForSwift/api/stage.cc +++ b/Firestore/core/interfaceForSwift/api/Stage.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "Firestore/core/interfaceForSwift/api/stage.h" +#include "Firestore/core/interfaceForSwift/api/Stage.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/interfaceForSwift/api/stage.h b/Firestore/core/interfaceForSwift/api/Stage.h similarity index 100% rename from Firestore/core/interfaceForSwift/api/stage.h rename to Firestore/core/interfaceForSwift/api/Stage.h diff --git a/Firestore/core/src/api/firestore.h b/Firestore/core/src/api/firestore.h index 8d0739fd645..aca18075ce5 100644 --- a/Firestore/core/src/api/firestore.h +++ b/Firestore/core/src/api/firestore.h @@ -21,7 +21,7 @@ #include #include -#include "Firestore/core/interfaceForSwift/api/pipeline_source.h" +#include "Firestore/core/interfaceForSwift/api/PipelineSource.h" #include "Firestore/core/src/api/api_fwd.h" #include "Firestore/core/src/api/load_bundle_task.h" #include "Firestore/core/src/api/settings.h" From ef10b6fab7b108f4d9969384db59e991310871a3 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Thu, 23 Jan 2025 13:42:23 -0500 Subject: [PATCH 30/30] Fix style --- Firestore/core/interfaceForSwift/api/CollectionStage.h | 6 +++--- Firestore/core/interfaceForSwift/api/FirestorePipeline.h | 6 +++--- Firestore/core/interfaceForSwift/api/Pipeline.cc | 2 +- Firestore/core/interfaceForSwift/api/PipelineResult.h | 6 +++--- Firestore/core/interfaceForSwift/api/PipelineSource.h | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Firestore/core/interfaceForSwift/api/CollectionStage.h b/Firestore/core/interfaceForSwift/api/CollectionStage.h index 40537f711b4..50cbed69408 100644 --- a/Firestore/core/interfaceForSwift/api/CollectionStage.h +++ b/Firestore/core/interfaceForSwift/api/CollectionStage.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTION_STAGE_H_ -#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTION_STAGE_H_ +#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTIONSTAGE_H_ +#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTIONSTAGE_H_ #include #include "Stage.h" @@ -36,4 +36,4 @@ class Collection : public Stage { } // namespace firestore } // namespace firebase -#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTION_STAGE_H_ +#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTIONSTAGE_H_ diff --git a/Firestore/core/interfaceForSwift/api/FirestorePipeline.h b/Firestore/core/interfaceForSwift/api/FirestorePipeline.h index 761375dd480..86bec3cf952 100644 --- a/Firestore/core/interfaceForSwift/api/FirestorePipeline.h +++ b/Firestore/core/interfaceForSwift/api/FirestorePipeline.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTORE_PIPELINE_H_ -#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTORE_PIPELINE_H_ +#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTOREPIPELINE_H_ +#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTOREPIPELINE_H_ #include @@ -34,4 +34,4 @@ class FirestorePipeline { } // namespace firestore } // namespace firebase -#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTORE_PIPELINE_H_ +#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTOREPIPELINE_H_ diff --git a/Firestore/core/interfaceForSwift/api/Pipeline.cc b/Firestore/core/interfaceForSwift/api/Pipeline.cc index 520ad7d23fd..63193ecdbb0 100644 --- a/Firestore/core/interfaceForSwift/api/Pipeline.cc +++ b/Firestore/core/interfaceForSwift/api/Pipeline.cc @@ -14,7 +14,7 @@ #include "Firestore/core/interfaceForSwift/api/Pipeline.h" -#include // NOLINT(build/c++11) +#include #include #include "Firestore/core/include/firebase/firestore/timestamp.h" diff --git a/Firestore/core/interfaceForSwift/api/PipelineResult.h b/Firestore/core/interfaceForSwift/api/PipelineResult.h index 10488aa9557..830566d0375 100644 --- a/Firestore/core/interfaceForSwift/api/PipelineResult.h +++ b/Firestore/core/interfaceForSwift/api/PipelineResult.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_RESULT_H_ -#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_RESULT_H_ +#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINERESULT_H_ +#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINERESULT_H_ #include @@ -48,4 +48,4 @@ class PipelineResult { } // namespace firestore } // namespace firebase -#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_RESULT_H_ +#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINERESULT_H_ diff --git a/Firestore/core/interfaceForSwift/api/PipelineSource.h b/Firestore/core/interfaceForSwift/api/PipelineSource.h index 0e49d6e06e7..c4d072230bf 100644 --- a/Firestore/core/interfaceForSwift/api/PipelineSource.h +++ b/Firestore/core/interfaceForSwift/api/PipelineSource.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_SOURCE_H_ -#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_SOURCE_H_ +#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINESOURCE_H_ +#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINESOURCE_H_ #include #include @@ -44,4 +44,4 @@ class PipelineSource { } // namespace firestore } // namespace firebase -#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_SOURCE_H_ +#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINESOURCE_H_