Skip to content

Commit

Permalink
add pipeline interface in cocoapods support
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylEnkidu committed Dec 13, 2024
1 parent 681f6b3 commit f0288cd
Show file tree
Hide file tree
Showing 7 changed files with 283 additions and 234 deletions.
481 changes: 250 additions & 231 deletions Firestore/Example/Firestore.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions Firestore/Source/API/FIRFirestore+Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ NS_ASSUME_NONNULL_BEGIN

- (const std::shared_ptr<firebase::firestore::util::AsyncQueue> &)workerQueue;

@property(nonatomic, assign, readonly) std::shared_ptr<api::Firestore> wrapped;

@property(nonatomic, assign, readonly) const model::DatabaseId &databaseID;
@property(nonatomic, strong, readonly) FSTUserDataReader *dataReader;

Expand Down
13 changes: 13 additions & 0 deletions Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#import <Foundation/Foundation.h>
#import <memory>

Check failure on line 18 in Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h

View workflow job for this annotation

GitHub Actions / client-app-spm-source-firestore (iOS, ClientApp)

'memory' file not found

Check failure on line 18 in Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h

View workflow job for this annotation

GitHub Actions / client-app-spm-source-firestore (iOS, ClientApp)

'memory' file not found

Check failure on line 18 in Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h

View workflow job for this annotation

GitHub Actions / client-app-spm-source-firestore (iOS, ClientApp)

'memory' file not found

Check failure on line 18 in Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h

View workflow job for this annotation

GitHub Actions / client-app-spm-source-firestore (iOS, ClientApp)

'memory' file not found

#import "FIRListenerRegistration.h"

Expand All @@ -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

/**
Expand Down Expand Up @@ -91,6 +102,8 @@ NS_SWIFT_NAME(Firestore)
*/
+ (instancetype)firestoreForDatabase:(NSString *)database NS_SWIFT_NAME(firestore(database:));

@property(nonatomic, assign, readonly) std::shared_ptr<api::Firestore> wrapped;

/**
* Custom settings used to configure this `Firestore` object.
*/
Expand Down
4 changes: 4 additions & 0 deletions Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,8 @@ public extension Firestore {
}
}
}

func pipeline() -> PipelineSource {
return PipelineSource(firebase.firestore.api.FirestorePipeline.pipeline(wrapped))

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / platforms (macOS)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / platforms (macOS)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / iOS-Device (macos-15, Xcode_16)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / iOS-Device (macos-15, Xcode_16)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / iOS-Device (macos-15, Xcode_16)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / iOS-Device (macos-15, Xcode_16)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / iOS-Device (macos-15, Xcode_16)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / iOS-Device (macos-15, Xcode_16)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / iOS-Device (macos-15, Xcode_16)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / iOS-Device (macos-15, Xcode_16)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / iOS-Device (macos-15, Xcode_16)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / iOS-Device (macos-15, Xcode_16)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / platforms (catalyst)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / platforms (catalyst)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / platforms (tvOS)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / swift-build-run (macos-15, Xcode_16, spm)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / swift-build-run (macos-15, Xcode_16, spm)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / swift-build-run (macos-15, Xcode_16, spm)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / swift-build-run (macos-15, Xcode_16, spm)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / swift-build-run (macos-15, Xcode_16, spm)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / swift-build-run (macos-15, Xcode_16, spm)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / swift-build-run (macos-15, Xcode_16, spm)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / swift-build-run (macos-15, Xcode_16, spm)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / swift-build-run (macos-15, Xcode_16, spm)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / swift-build-run (macos-15, Xcode_16, spm)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / swift-build-run (macos-14, Xcode_15.3, spm)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / swift-build-run (macos-14, Xcode_15.3, spm)

cannot find 'wrapped' in scope

Check failure on line 120 in Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift

View workflow job for this annotation

GitHub Actions / swift-build-run (macos-14, Xcode_15.3, spm)

cannot find 'wrapped' in scope
}
}
14 changes: 14 additions & 0 deletions Firestore/Swift/Source/SwiftAPI/PipelineSource.swift
Original file line number Diff line number Diff line change
@@ -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
}
}
2 changes: 1 addition & 1 deletion Firestore/core/swift/include/firestore_pipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Firestore;

class FirestorePipeline {
public:
PipelineSource pipeline(std::shared_ptr<Firestore> firestore);
static PipelineSource pipeline(std::shared_ptr<Firestore> firestore);
};

} // namespace api
Expand Down
1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,7 @@ func firebaseFirestoreCppTarget() -> Target {
"FirebaseAppCheckInterop",
"FirebaseCore",
"leveldb",
"FirebaseFirestoreInternalWrapper",
.product(name: "nanopb", package: "nanopb"),
],
path: "Firestore/core/swift",
Expand Down

0 comments on commit f0288cd

Please sign in to comment.