Skip to content

Commit 1eefcbf

Browse files
committed
restrict public api to be interfaceForSwift only
1 parent 4b3a9aa commit 1eefcbf

27 files changed

+152
-29
lines changed

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/core/interfaceForSwift/api/FirebaseFirestoreCpp.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIREBASEFIRESTORECPP_H_
1818
#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIREBASEFIRESTORECPP_H_
1919

20-
#import "CollectionStage.h"
21-
#import "FirestorePipeline.h"
22-
#import "Pipeline.h"
23-
#import "PipelineResult.h"
24-
#import "PipelineSource.h"
25-
#import "Stage.h"
20+
#import "Firestore/core/interfaceForSwift/api/collection_stage.h"
21+
#import "Firestore/core/interfaceForSwift/api/firestore_pipeline.h"
22+
#import "Firestore/core/interfaceForSwift/api/pipeline.h"
23+
#import "Firestore/core/interfaceForSwift/api/pipeline_result.h"
24+
#import "Firestore/core/interfaceForSwift/api/pipeline_source.h"
25+
#import "Firestore/core/interfaceForSwift/api/stage.h"
2626

2727
#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIREBASEFIRESTORECPP_H_
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTION_STAGE_H_
16+
#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTION_STAGE_H_
17+
18+
#include <string>
19+
#include "Firestore/core/interfaceForSwift/api/stage.h"
20+
21+
namespace firebase {
22+
namespace firestore {
23+
24+
namespace api {
25+
26+
class Collection : public Stage {
27+
public:
28+
explicit Collection(std::string collection_path);
29+
30+
private:
31+
std::string collection_path_;
32+
};
33+
34+
} // namespace api
35+
36+
} // namespace firestore
37+
} // namespace firebase
38+
39+
#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTION_STAGE_H_
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTORE_PIPELINE_H_
16+
#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTORE_PIPELINE_H_
17+
18+
#include <memory>
19+
20+
#include "Firestore/core/interfaceForSwift/api/pipeline_source.h"
21+
22+
namespace firebase {
23+
namespace firestore {
24+
25+
namespace api {
26+
class Firestore;
27+
28+
class FirestorePipeline {
29+
public:
30+
static PipelineSource pipeline(std::shared_ptr<Firestore> firestore);
31+
};
32+
33+
} // namespace api
34+
} // namespace firestore
35+
} // namespace firebase
36+
37+
#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTORE_PIPELINE_H_
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_SOURCE_H_
16+
#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_SOURCE_H_
17+
18+
#include <memory>
19+
#include <string>
20+
#include <vector>
21+
22+
#include "Firestore/core/interfaceForSwift/api/pipeline.h"
23+
24+
namespace firebase {
25+
namespace firestore {
26+
27+
namespace api {
28+
29+
class Firestore;
30+
class DocumentReference;
31+
32+
class PipelineSource {
33+
public:
34+
explicit PipelineSource(std::shared_ptr<Firestore> firestore);
35+
36+
Pipeline GetCollection(std::string collection_path) const;
37+
38+
private:
39+
std::shared_ptr<Firestore> firestore_;
40+
};
41+
42+
} // namespace api
43+
44+
} // namespace firestore
45+
} // namespace firebase
46+
47+
#endif // FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_SOURCE_H_

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ func firestoreTargets() -> [Target] {
14971497
"core/include/",
14981498
"core/src",
14991499
],
1500-
publicHeadersPath: "core/src/api",
1500+
publicHeadersPath: "core/interfaceForSwift",
15011501
cSettings: [
15021502
.headerSearchPath("../"),
15031503
.headerSearchPath("Protos/nanopb"),

0 commit comments

Comments
 (0)