Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -37,6 +37,17 @@
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "331C80D4294CF70F00263BE5"
BuildableName = "RunnerTests.xctest"
BlueprintName = "RunnerTests"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
PRODUCT_NAME = example

// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.firebase.example
PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.firebase.firestore.example

// The copyright displayed in application information
PRODUCT_COPYRIGHT = Copyright © 2022 io.flutter.plugins.firebase. All rights reserved.
PRODUCT_COPYRIGHT = Copyright © 2024 io.flutter.plugins.firebase.firestore. All rights reserved.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import FlutterMacOS

class MainFlutterWindow: NSWindow {
override func awakeFromNib() {
let flutterViewController = FlutterViewController.init()
let flutterViewController = FlutterViewController()
let windowFrame = self.frame
self.contentViewController = flutterViewController
self.setFrame(windowFrame, display: true)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright 2024, the Chromium project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import Cocoa
import FlutterMacOS
import XCTest

class RunnerTests: XCTestCase {
func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ + (FIRFilter *_Nonnull)filterFromJson:(NSDictionary<NSString *, id> *_Nullable)m
@throw [NSException exceptionWithName:@"InvalidOperator" reason:@"Invalid operator" userInfo:nil];
}

+ (FIRQuery *)parseQueryWithParameters:(nonnull PigeonQueryParameters *)parameters
firestore:(nonnull FIRFirestore *)firestore
path:(nonnull NSString *)path
isCollectionGroup:(Boolean)isCollectionGroup {
+ (FIRQuery *_Nonnull)parseQueryWithParameters:(nonnull PigeonQueryParameters *)parameters
firestore:(nonnull FIRFirestore *)firestore
path:(nonnull NSString *)path
isCollectionGroup:(Boolean)isCollectionGroup {
@try {
FIRQuery *query;

Expand Down Expand Up @@ -177,7 +177,8 @@ + (FIRFirestoreSource)parseSource:(Source)source {
}
}

+ (NSArray<FIRFieldPath *> *)parseFieldPath:(NSArray<NSArray<NSString *> *> *)fieldPaths {
+ (NSArray<FIRFieldPath *> *_Nonnull)parseFieldPath:
(NSArray<NSArray<NSString *> *> *_Nonnull)fieldPaths {
NSMutableArray<FIRFieldPath *> *paths = [NSMutableArray arrayWithCapacity:[fieldPaths count]];
for (NSArray<NSString *> *fieldPath in fieldPaths) {
FIRFieldPath *parsed = [[FIRFieldPath alloc] initWithFields:fieldPath];
Expand Down Expand Up @@ -217,15 +218,16 @@ + (FIRListenSource)parseListenSource:(ListenSource)source {
}
}

+ (PigeonSnapshotMetadata *)toPigeonSnapshotMetadata:(FIRSnapshotMetadata *)snapshotMetadata {
+ (PigeonSnapshotMetadata *_Nonnull)toPigeonSnapshotMetadata:
(FIRSnapshotMetadata *_Nonnull)snapshotMetadata {
return [PigeonSnapshotMetadata
makeWithHasPendingWrites:[NSNumber numberWithBool:snapshotMetadata.hasPendingWrites]
isFromCache:[NSNumber numberWithBool:snapshotMetadata.isFromCache]];
}

+ (PigeonDocumentSnapshot *)toPigeonDocumentSnapshot:(FIRDocumentSnapshot *)documentSnapshot
serverTimestampBehavior:
(FIRServerTimestampBehavior)serverTimestampBehavior {
+ (PigeonDocumentSnapshot *_Nonnull)
toPigeonDocumentSnapshot:(FIRDocumentSnapshot *_Nonnull)documentSnapshot
serverTimestampBehavior:(FIRServerTimestampBehavior)serverTimestampBehavior {
return [PigeonDocumentSnapshot
makeWithPath:documentSnapshot.reference.path
data:[documentSnapshot dataWithServerTimestampBehavior:serverTimestampBehavior]
Expand All @@ -247,9 +249,9 @@ + (DocumentChangeType)toPigeonDocumentChangeType:(FIRDocumentChangeType)document
}
}

+ (PigeonDocumentChange *)toPigeonDocumentChange:(FIRDocumentChange *)documentChange
serverTimestampBehavior:
(FIRServerTimestampBehavior)serverTimestampBehavior {
+ (PigeonDocumentChange *_Nonnull)toPigeonDocumentChange:(FIRDocumentChange *_Nonnull)documentChange
serverTimestampBehavior:
(FIRServerTimestampBehavior)serverTimestampBehavior {
NSNumber *oldIndex;
NSNumber *newIndex;

Expand Down Expand Up @@ -279,8 +281,8 @@ + (PigeonDocumentChange *)toPigeonDocumentChange:(FIRDocumentChange *)documentCh
newIndex:newIndex];
}

+ (NSArray<PigeonDocumentChange *> *)
toPigeonDocumentChanges:(NSArray<FIRDocumentChange *> *)documentChanges
+ (NSArray<PigeonDocumentChange *> *_Nonnull)
toPigeonDocumentChanges:(NSArray<FIRDocumentChange *> *_Nonnull)documentChanges
serverTimestampBehavior:(FIRServerTimestampBehavior)serverTimestampBehavior {
NSMutableArray *pigeonDocumentChanges = [NSMutableArray array];
for (FIRDocumentChange *documentChange in documentChanges) {
Expand All @@ -291,8 +293,9 @@ + (PigeonDocumentChange *)toPigeonDocumentChange:(FIRDocumentChange *)documentCh
return pigeonDocumentChanges;
}

+ (PigeonQuerySnapshot *)toPigeonQuerySnapshot:(FIRQuerySnapshot *)querySnaphot
serverTimestampBehavior:(FIRServerTimestampBehavior)serverTimestampBehavior {
+ (PigeonQuerySnapshot *_Nonnull)toPigeonQuerySnapshot:(FIRQuerySnapshot *_Nonnull)querySnaphot
serverTimestampBehavior:
(FIRServerTimestampBehavior)serverTimestampBehavior {
NSMutableArray *documentSnapshots = [NSMutableArray array];
for (FIRDocumentSnapshot *documentSnapshot in querySnaphot.documents) {
[documentSnapshots
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,42 @@

@interface FirestorePigeonParser : NSObject

+ (FIRQuery *)parseQueryWithParameters:(nonnull PigeonQueryParameters *)parameters
firestore:(nonnull FIRFirestore *)firestore
path:(nonnull NSString *)path
isCollectionGroup:(Boolean)isCollectionGroup;
+ (FIRFilter *_Nonnull)filterFromJson:(NSDictionary<NSString *, id> *_Nullable)map;

+ (FIRQuery *_Nonnull)parseQueryWithParameters:(nonnull PigeonQueryParameters *)parameters
firestore:(nonnull FIRFirestore *)firestore
path:(nonnull NSString *)path
isCollectionGroup:(Boolean)isCollectionGroup;

+ (FIRFirestoreSource)parseSource:(Source)source;

+ (NSArray<FIRFieldPath *> *_Nonnull)parseFieldPath:
(NSArray<NSArray<NSString *> *> *_Nonnull)fieldPaths;

+ (FIRServerTimestampBehavior)parseServerTimestampBehavior:
(ServerTimestampBehavior)serverTimestampBehavior;

+ (FIRListenSource)parseListenSource:(ListenSource)source;
+ (PigeonDocumentSnapshot *)toPigeonDocumentSnapshot:(FIRDocumentSnapshot *)documentSnapshot
serverTimestampBehavior:
(FIRServerTimestampBehavior)serverTimestampBehavior;
+ (PigeonQuerySnapshot *)toPigeonQuerySnapshot:(FIRQuerySnapshot *)querySnaphot
serverTimestampBehavior:(FIRServerTimestampBehavior)serverTimestampBehavior;
+ (NSArray<PigeonDocumentChange *> *)
toPigeonDocumentChanges:(NSArray<FIRDocumentChange *> *)documentChanges
serverTimestampBehavior:(FIRServerTimestampBehavior)serverTimestampBehavior;
+ (PigeonDocumentChange *)toPigeonDocumentChange:(FIRDocumentChange *)documentChange
serverTimestampBehavior:
(FIRServerTimestampBehavior)serverTimestampBehavior;
+ (PigeonSnapshotMetadata *)toPigeonSnapshotMetadata:(FIRSnapshotMetadata *)snapshotMetadata;

+ (PigeonSnapshotMetadata *_Nonnull)toPigeonSnapshotMetadata:
(FIRSnapshotMetadata *_Nonnull)snapshotMetadata;

+ (PigeonDocumentSnapshot *_Nonnull)
toPigeonDocumentSnapshot:(FIRDocumentSnapshot *_Nonnull)documentSnapshot
serverTimestampBehavior:(FIRServerTimestampBehavior)serverTimestampBehavior;

+ (DocumentChangeType)toPigeonDocumentChangeType:(FIRDocumentChangeType)documentChangeType;
+ (NSArray<FIRFieldPath *> *)parseFieldPath:(NSArray<NSArray<NSString *> *> *)fieldPaths;

+ (PigeonDocumentChange *_Nonnull)toPigeonDocumentChange:(FIRDocumentChange *_Nonnull)documentChange
serverTimestampBehavior:
(FIRServerTimestampBehavior)serverTimestampBehavior;

+ (NSArray<PigeonDocumentChange *> *_Nonnull)
toPigeonDocumentChanges:(NSArray<FIRDocumentChange *> *_Nonnull)documentChanges
serverTimestampBehavior:(FIRServerTimestampBehavior)serverTimestampBehavior;

+ (PigeonQuerySnapshot *_Nonnull)toPigeonQuerySnapshot:(FIRQuerySnapshot *_Nonnull)querySnaphot
serverTimestampBehavior:
(FIRServerTimestampBehavior)serverTimestampBehavior;

@end