Skip to content

Commit 0cfe3e5

Browse files
authored
Merge d25aca4 into 72430e8
2 parents 72430e8 + d25aca4 commit 0cfe3e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+136
-130
lines changed

FirebaseFirestore.podspec

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
3535
s.pod_target_xcconfig = {
3636
# Enables C++ <-> Swift interop (by default it's only C)
3737
"SWIFT_OBJC_INTEROP_MODE" => "objcxx",
38+
'HEADER_SEARCH_PATHS' => '${PODS_TARGET_SRCROOT} "${PODS_TARGET_SRCROOT}/Firestore/core/src/api"'
3839
}
3940

4041
s.resource_bundles = {

FirebaseFirestoreInternal.podspec

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
3030
# framework.
3131
s.public_header_files = [
3232
'Firestore/Source/Public/FirebaseFirestore/*.h',
33-
'Firestore/core/interfaceForSwift/api/*.h'
33+
'Firestore/core/src/api/FirebaseFirestoreCpp.h'
3434
]
3535

3636
# source_files contains most of the header and source files for the project.
@@ -54,8 +54,8 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
5454
'Firestore/Protos/nanopb/**/*.cc',
5555
'Firestore/core/include/**/*.{cc,mm}',
5656
'Firestore/core/src/**/*.{cc,mm}',
57+
'Firestore/core/src/api/*.{cc,mm}',
5758
'FirebaseAuth/Interop/**/*.h',
58-
'Firestore/core/interfaceForSwift/**/*.{cc,h}',
5959
]
6060

6161
# Internal headers that aren't necessarily globally unique. Most C++ internal
@@ -132,6 +132,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
132132
'HEADER_SEARCH_PATHS' =>
133133
'"${PODS_TARGET_SRCROOT}" ' +
134134
'"${PODS_TARGET_SRCROOT}/Firestore/Source/Public" ' +
135+
'"${PODS_TARGET_SRCROOT}/Firestore/core/src/api" ' +
135136
'"${PODS_ROOT}/nanopb" ' +
136137
'"${PODS_TARGET_SRCROOT}/Firestore/Protos/nanopb"'
137138
}

Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_macOS.xcscheme

+9-13
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "54B8E4A9224BDC4100930F18"
34+
BuildableName = "Firestore_IntegrationTests_macOS.xctest"
35+
BlueprintName = "Firestore_IntegrationTests_macOS"
36+
ReferencedContainer = "container:Firestore.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
3140
<TestableReference
3241
skipped = "NO">
@@ -39,17 +48,6 @@
3948
</BuildableReference>
4049
</TestableReference>
4150
</Testables>
42-
<MacroExpansion>
43-
<BuildableReference
44-
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "54B8E4A9224BDC4100930F18"
46-
BuildableName = "Firestore_IntegrationTests_macOS.xctest"
47-
BlueprintName = "Firestore_IntegrationTests_macOS"
48-
ReferencedContainer = "container:Firestore.xcodeproj">
49-
</BuildableReference>
50-
</MacroExpansion>
51-
<AdditionalOptions>
52-
</AdditionalOptions>
5351
</TestAction>
5452
<LaunchAction
5553
buildConfiguration = "Debug"
@@ -70,8 +68,6 @@
7068
ReferencedContainer = "container:Firestore.xcodeproj">
7169
</BuildableReference>
7270
</MacroExpansion>
73-
<AdditionalOptions>
74-
</AdditionalOptions>
7571
</LaunchAction>
7672
<ProfileAction
7773
buildConfiguration = "Release"

Firestore/Source/Public/FirebaseFirestore/FirebaseFirestore.h

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#import "FIRAggregateQuery.h"
1919
#import "FIRAggregateQuerySnapshot.h"
2020
#import "FIRAggregateSource.h"
21-
#import "FIRCallbackWrapper.h"
2221
#import "FIRCollectionReference.h"
2322
#import "FIRDocumentChange.h"
2423
#import "FIRDocumentReference.h"

Firestore/Swift/Source/AsyncAwait/CollectionReference+AsyncAwait.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#if SWIFT_PACKAGE
18-
@_exported import FirebaseFirestoreInternalWrapper
18+
@_exported import FirebaseFirestoreCpp
1919
#else
2020
@_exported import FirebaseFirestoreInternal
2121
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#if SWIFT_PACKAGE
1818
import FirebaseFirestoreCpp
19-
@_exported import FirebaseFirestoreInternalWrapper
19+
@_exported import FirebaseFirestoreObjCpp
2020
#else
2121
@_exported import FirebaseFirestoreInternal
2222
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/CodablePassThroughTypes.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import FirebaseSharedSwift
2020
import Foundation
2121

2222
#if SWIFT_PACKAGE
23-
@_exported import FirebaseFirestoreInternalWrapper
23+
@_exported import FirebaseFirestoreObjCpp
2424
#else
2525
@_exported import FirebaseFirestoreInternal
2626
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/CollectionReference+WriteEncodable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import Foundation
1818

1919
#if SWIFT_PACKAGE
20-
@_exported import FirebaseFirestoreInternalWrapper
20+
@_exported import FirebaseFirestoreObjCpp
2121
#else
2222
@_exported import FirebaseFirestoreInternal
2323
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/DocumentID.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#if SWIFT_PACKAGE
18-
@_exported import FirebaseFirestoreInternalWrapper
18+
@_exported import FirebaseFirestoreObjCpp
1919
#else
2020
@_exported import FirebaseFirestoreInternal
2121
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/DocumentReference+Codable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#if SWIFT_PACKAGE
18-
@_exported import FirebaseFirestoreInternalWrapper
18+
@_exported import FirebaseFirestoreObjCpp
1919
#else
2020
@_exported import FirebaseFirestoreInternal
2121
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/DocumentReference+ReadDecodable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import Foundation
1818
#if SWIFT_PACKAGE
19-
@_exported import FirebaseFirestoreInternalWrapper
19+
@_exported import FirebaseFirestoreObjCpp
2020
#else
2121
@_exported import FirebaseFirestoreInternal
2222
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/DocumentReference+WriteEncodable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import Foundation
1818
#if SWIFT_PACKAGE
19-
@_exported import FirebaseFirestoreInternalWrapper
19+
@_exported import FirebaseFirestoreObjCpp
2020
#else
2121
@_exported import FirebaseFirestoreInternal
2222
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/DocumentSnapshot+ReadDecodable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import Foundation
1818
#if SWIFT_PACKAGE
19-
@_exported import FirebaseFirestoreInternalWrapper
19+
@_exported import FirebaseFirestoreObjCpp
2020
#else
2121
@_exported import FirebaseFirestoreInternal
2222
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/EncoderDecoder.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#if SWIFT_PACKAGE
18-
@_exported import FirebaseFirestoreInternalWrapper
18+
@_exported import FirebaseFirestoreObjCpp
1919
#else
2020
@_exported import FirebaseFirestoreInternal
2121
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/ExplicitNull.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#if SWIFT_PACKAGE
18-
@_exported import FirebaseFirestoreInternalWrapper
18+
@_exported import FirebaseFirestoreObjCpp
1919
#else
2020
@_exported import FirebaseFirestoreInternal
2121
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/FieldValue+Encodable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#if SWIFT_PACKAGE
18-
@_exported import FirebaseFirestoreInternalWrapper
18+
@_exported import FirebaseFirestoreObjCpp
1919
#else
2020
@_exported import FirebaseFirestoreInternal
2121
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/GeoPoint+Codable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#if SWIFT_PACKAGE
18-
@_exported import FirebaseFirestoreInternalWrapper
18+
@_exported import FirebaseFirestoreObjCpp
1919
#else
2020
@_exported import FirebaseFirestoreInternal
2121
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/Transaction+WriteEncodable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import Foundation
1818
#if SWIFT_PACKAGE
19-
@_exported import FirebaseFirestoreInternalWrapper
19+
@_exported import FirebaseFirestoreObjCpp
2020
#else
2121
@_exported import FirebaseFirestoreInternal
2222
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/VectorValue+Codable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#if SWIFT_PACKAGE
18-
@_exported import FirebaseFirestoreInternalWrapper
18+
@_exported import FirebaseFirestoreObjCpp
1919
#else
2020
@_exported import FirebaseFirestoreInternal
2121
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/Codable/WriteBatch+WriteEncodable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import Foundation
1818
#if SWIFT_PACKAGE
19-
@_exported import FirebaseFirestoreInternalWrapper
19+
@_exported import FirebaseFirestoreObjCpp
2020
#else
2121
@_exported import FirebaseFirestoreInternal
2222
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/PropertyWrapper/FirestoreQuery.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import SwiftUI
1818

1919
#if SWIFT_PACKAGE
20-
@_exported import FirebaseFirestoreInternalWrapper
20+
@_exported import FirebaseFirestoreObjCpp
2121
#else
2222
@_exported import FirebaseFirestoreInternal
2323
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/PropertyWrapper/FirestoreQueryObservable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import SwiftUI
1818

1919
#if SWIFT_PACKAGE
20-
@_exported import FirebaseFirestoreInternalWrapper
20+
@_exported import FirebaseFirestoreObjCpp
2121
#else
2222
@_exported import FirebaseFirestoreInternal
2323
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/PropertyWrapper/QueryPredicate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#if SWIFT_PACKAGE
18-
@_exported import FirebaseFirestoreInternalWrapper
18+
@_exported import FirebaseFirestoreObjCpp
1919
#else
2020
@_exported import FirebaseFirestoreInternal
2121
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/SwiftAPI/FieldValue+Swift.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#if SWIFT_PACKAGE
18-
@_exported import FirebaseFirestoreInternalWrapper
18+
@_exported import FirebaseFirestoreObjCpp
1919
#else
2020
@_exported import FirebaseFirestoreInternal
2121
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/SwiftAPI/Pipeline.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#if SWIFT_PACKAGE
1616
import FirebaseFirestoreCpp
17-
@_exported import FirebaseFirestoreInternalWrapper
17+
@_exported import FirebaseFirestoreObjCpp
1818
#else
1919
@_exported import FirebaseFirestoreInternal
2020
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/SwiftAPI/VectorValue+Swift.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#if SWIFT_PACKAGE
18-
@_exported import FirebaseFirestoreInternalWrapper
18+
@_exported import FirebaseFirestoreObjCpp
1919
#else
2020
@_exported import FirebaseFirestoreInternal
2121
#endif // SWIFT_PACKAGE

Firestore/Swift/Source/SwiftHeaderWorkaround.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// limitations under the License.
1414

1515
#if SWIFT_PACKAGE
16-
@_exported import FirebaseFirestoreInternalWrapper
16+
@_exported import FirebaseFirestoreObjCpp
1717
#else
1818
@_exported import FirebaseFirestoreInternal
1919
#endif // SWIFT_PACKAGE

Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h renamed to Firestore/core/src/api/FIRCallbackWrapper.h

+17-11
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
#ifndef FIRESTORE_CORE_SRC_API_FIRCALLBACKWRAPPER_H_
18+
#define FIRESTORE_CORE_SRC_API_FIRCALLBACKWRAPPER_H_
19+
1720
#import <Foundation/Foundation.h>
1821

1922
#if defined(__cplusplus)
@@ -26,40 +29,43 @@ namespace api {
2629
class Firestore;
2730
class PipelineResult;
2831
} // namespace api
29-
3032
namespace core {
3133
template <typename T>
3234
class EventListener;
3335
} // namespace core
34-
3536
} // namespace firestore
3637
} // namespace firebase
37-
3838
namespace api = firebase::firestore::api;
3939
namespace core = firebase::firestore::core;
4040

4141
NS_ASSUME_NONNULL_BEGIN
4242

4343
typedef api::PipelineResult CppPipelineResult;
4444

45-
typedef void (^PipelineBlock)(CppPipelineResult *_Nullable result, NSError *_Nullable error)
45+
typedef void (^PipelineBlock)(CppPipelineResult* _Nullable result,
46+
NSError* _Nullable error)
4647
NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");
4748

4849
NS_SWIFT_SENDABLE
4950
NS_SWIFT_NAME(CallbackWrapper)
5051
@interface FIRCallbackWrapper : NSObject
5152

52-
// Note: Marking callbacks in callback-based APIs as `Sendable` can help prevent crashes when they
53-
// are invoked on a different thread than the one they were originally defined in. If this callback
54-
// is expected to be called on a different thread, it should be marked as `Sendable` to ensure
55-
// thread safety.
53+
// Note: Marking callbacks in callback-based APIs as `Sendable` can help prevent
54+
// crashes when they are invoked on a different thread than the one they were
55+
// originally defined in. If this callback is expected to be called on a
56+
// different thread, it should be marked as `Sendable` to ensure thread safety.
5657
+ (std::shared_ptr<core::EventListener<api::PipelineResult>>)
58+
// NOLINTNEXTLINE(whitespace/parens)
5759
wrapPipelineCallback:(std::shared_ptr<api::Firestore>)firestore
58-
completion:(void (^NS_SWIFT_SENDABLE)(CppPipelineResult *_Nullable result,
59-
NSError *_Nullable error))completion
60+
// NOLINTNEXTLINE(whitespace/parens)
61+
completion:(void (^NS_SWIFT_SENDABLE)(
62+
CppPipelineResult* _Nullable result,
63+
NSError* _Nullable error))completion
6064
NS_SWIFT_NAME(wrapPipelineCallback(firestore:completion:));
6165

6266
@end
6367

6468
NS_ASSUME_NONNULL_END
65-
#endif
69+
#endif // defined(__cplusplus)
70+
71+
#endif // FIRESTORE_CORE_SRC_API_FIRCALLBACKWRAPPER_H_

0 commit comments

Comments
 (0)