From eee275f5f0d3c849dc566d30551a55ba67958202 Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Tue, 22 Oct 2024 11:05:12 +0100 Subject: [PATCH] working version of firestore and core --- .../cloud_firestore/ios/cloud_firestore/Package.swift | 4 ++-- .../cloud_firestore/FLTDocumentSnapshotStreamHandler.m | 2 +- .../Sources/cloud_firestore/FLTFirebaseFirestorePlugin.m | 2 +- .../Sources/cloud_firestore/FLTFirebaseFirestoreReader.m | 3 ++- .../Sources/cloud_firestore/FLTFirebaseFirestoreWriter.m | 2 +- .../Sources/cloud_firestore/FLTLoadBundleStreamHandler.m | 2 +- .../cloud_firestore/FLTQuerySnapshotStreamHandler.m | 2 +- .../cloud_firestore/FLTSnapshotsInSyncStreamHandler.m | 2 +- .../cloud_firestore/FLTTransactionStreamHandler.m | 2 +- .../cloud_firestore/Public/FLTFirebaseFirestorePlugin.h | 2 +- .../firebase_core/ios/firebase_core/Package.swift | 9 +++++++++ 11 files changed, 21 insertions(+), 11 deletions(-) diff --git a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Package.swift b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Package.swift index 7cbadaee63a6..a180f254a280 100644 --- a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Package.swift +++ b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Package.swift @@ -75,7 +75,7 @@ let package = Package( // .package(name:"flutterfire", path: "../../../../.."), // TODO - this needs a version instead // This isn't working - .package(url:"https://github.com/russellwheatley/test-flutterfire", exact: "0.0.19"), + .package(url:"https://github.com/russellwheatley/test-flutterfire", exact: "0.0.24"), ], targets: [ .target( @@ -83,7 +83,7 @@ let package = Package( dependencies: [ .product(name: "FirebaseFirestore", package: "firebase-ios-sdk"), // Wrapper dependency - .product(name: "firebase-core-wrapper", package: "test-flutterfire") + .product(name: "firebase-core-shared", package: "test-flutterfire") ], resources: [ .process("Resources"), diff --git a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTDocumentSnapshotStreamHandler.m b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTDocumentSnapshotStreamHandler.m index 14b77ddbbd9c..9b86c7f721fb 100644 --- a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTDocumentSnapshotStreamHandler.m +++ b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTDocumentSnapshotStreamHandler.m @@ -3,7 +3,7 @@ // found in the LICENSE file. @import FirebaseFirestore; -#import +#import #import "include/cloud_firestore/Private/FLTDocumentSnapshotStreamHandler.h" #import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h" diff --git a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestorePlugin.m b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestorePlugin.m index cd324733fc45..5aa970fa3a33 100644 --- a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestorePlugin.m +++ b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestorePlugin.m @@ -3,7 +3,7 @@ // found in the LICENSE file. @import FirebaseFirestore; -#import +#import #import #import "FirebaseFirestoreInternal/FIRPersistentCacheIndexManager.h" diff --git a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestoreReader.m b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestoreReader.m index 3f580aaeb2aa..f69d78bf89d6 100644 --- a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestoreReader.m +++ b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestoreReader.m @@ -3,8 +3,9 @@ // found in the LICENSE file. @import FirebaseFirestore; -#import +@import FirebaseCore; +#import #import "include/cloud_firestore/Private/FLTFirebaseFirestoreReader.h" #import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h" diff --git a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestoreWriter.m b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestoreWriter.m index d7af75396dd7..6868868a3742 100644 --- a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestoreWriter.m +++ b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestoreWriter.m @@ -3,7 +3,7 @@ // found in the LICENSE file. @import FirebaseFirestore; -#import +@import FirebaseCore; #import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h" #import "include/cloud_firestore/Private/FLTFirebaseFirestoreWriter.h" diff --git a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTLoadBundleStreamHandler.m b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTLoadBundleStreamHandler.m index a6a5533f57fe..a73dd35d1690 100644 --- a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTLoadBundleStreamHandler.m +++ b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTLoadBundleStreamHandler.m @@ -10,7 +10,7 @@ // @import FirebaseFirestore; -#import +#import #import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h" #import "include/cloud_firestore/Private/FLTLoadBundleStreamHandler.h" diff --git a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTQuerySnapshotStreamHandler.m b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTQuerySnapshotStreamHandler.m index 988a3330197e..4c3e3eff80f4 100644 --- a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTQuerySnapshotStreamHandler.m +++ b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTQuerySnapshotStreamHandler.m @@ -3,7 +3,7 @@ // found in the LICENSE file. @import FirebaseFirestore; -#import +#import #import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h" #import "include/cloud_firestore/Private/FLTQuerySnapshotStreamHandler.h" diff --git a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTSnapshotsInSyncStreamHandler.m b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTSnapshotsInSyncStreamHandler.m index 63776fa99207..98ef428a2084 100644 --- a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTSnapshotsInSyncStreamHandler.m +++ b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTSnapshotsInSyncStreamHandler.m @@ -3,7 +3,7 @@ // found in the LICENSE file. @import FirebaseFirestore; -#import +#import #import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h" #import "include/cloud_firestore/Private/FLTSnapshotsInSyncStreamHandler.h" diff --git a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTTransactionStreamHandler.m b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTTransactionStreamHandler.m index 29e1a58948fc..560b7ffa7b73 100644 --- a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTTransactionStreamHandler.m +++ b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTTransactionStreamHandler.m @@ -3,7 +3,7 @@ // found in the LICENSE file. @import FirebaseFirestore; -#import +#import #import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h" #import "include/cloud_firestore/Private/FLTTransactionStreamHandler.h" diff --git a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/include/cloud_firestore/Public/FLTFirebaseFirestorePlugin.h b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/include/cloud_firestore/Public/FLTFirebaseFirestorePlugin.h index b8cbed4d1b43..37ccba1305f8 100644 --- a/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/include/cloud_firestore/Public/FLTFirebaseFirestorePlugin.h +++ b/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/include/cloud_firestore/Public/FLTFirebaseFirestorePlugin.h @@ -10,7 +10,7 @@ #endif #import -#import +#import #import "FirestoreMessages.g.h" @interface FLTFirebaseFirestorePlugin diff --git a/packages/firebase_core/firebase_core/ios/firebase_core/Package.swift b/packages/firebase_core/firebase_core/ios/firebase_core/Package.swift index 5d4cd0f52b5f..d4b527d15199 100644 --- a/packages/firebase_core/firebase_core/ios/firebase_core/Package.swift +++ b/packages/firebase_core/firebase_core/ios/firebase_core/Package.swift @@ -89,6 +89,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/firebase/firebase-ios-sdk", from: firebase_sdk_version), + .package(url:"https://github.com/russellwheatley/test-flutterfire", exact: "0.0.24"), ], targets: [ .target( @@ -96,6 +97,14 @@ let package = Package( dependencies: [ // No product for firebase-core so we pull in the smallest one .product(name: "FirebaseInstallations", package: "firebase-ios-sdk"), + .product(name: "firebase-core-shared", package: "test-flutterfire") + ], + exclude: [ + // These are now pulled in as a remote dependency from FlutterFire repo + "FLTFirebasePlugin.m", + "FLTFirebasePluginRegistry.m", + "include/firebase_core/FLTFirebasePlugin.h", + "include/firebase_core/FLTFirebasePluginRegistry.h" ], resources: [ .process("Resources"),