diff options
Diffstat (limited to 'Firestore/Source/API/FIRFirestore.mm')
-rw-r--r-- | Firestore/Source/API/FIRFirestore.mm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Firestore/Source/API/FIRFirestore.mm b/Firestore/Source/API/FIRFirestore.mm index eff0605..f3769ed 100644 --- a/Firestore/Source/API/FIRFirestore.mm +++ b/Firestore/Source/API/FIRFirestore.mm @@ -34,7 +34,6 @@ #import "Firestore/Source/Core/FSTFirestoreClient.h" #import "Firestore/Source/Model/FSTDocumentKey.h" -#import "Firestore/Source/Model/FSTPath.h" #import "Firestore/Source/Util/FSTAssert.h" #import "Firestore/Source/Util/FSTDispatchQueue.h" #import "Firestore/Source/Util/FSTLogger.h" @@ -44,6 +43,7 @@ #include "Firestore/core/src/firebase/firestore/auth/firebase_credentials_provider_apple.h" #include "Firestore/core/src/firebase/firestore/core/database_info.h" #include "Firestore/core/src/firebase/firestore/model/database_id.h" +#include "Firestore/core/src/firebase/firestore/model/resource_path.h" #include "Firestore/core/src/firebase/firestore/util/string_apple.h" #include "absl/memory/memory.h" @@ -52,6 +52,7 @@ using firebase::firestore::auth::CredentialsProvider; using firebase::firestore::auth::FirebaseCredentialsProvider; using firebase::firestore::core::DatabaseInfo; using firebase::firestore::model::DatabaseId; +using firebase::firestore::model::ResourcePath; NS_ASSUME_NONNULL_BEGIN @@ -141,9 +142,9 @@ extern "C" NSString *const FIRFirestoreErrorDomain = @"FIRFirestoreErrorDomain"; } if (!database) { FSTThrowInvalidArgument( - @"database identifier may not be nil. Use '%@' if you want the default " + @"database identifier may not be nil. Use '%s' if you want the default " "database", - util::WrapNSStringNoCopy(DatabaseId::kDefault)); + DatabaseId::kDefault); } // Note: If the key format changes, please change the code that detects FIRApps being deleted @@ -261,7 +262,7 @@ extern "C" NSString *const FIRFirestoreErrorDomain = @"FIRFirestoreErrorDomain"; FSTThrowInvalidArgument(@"Collection path cannot be nil."); } [self ensureClientConfigured]; - FSTResourcePath *path = [FSTResourcePath pathWithString:collectionPath]; + const ResourcePath path = ResourcePath::FromString(util::MakeStringView(collectionPath)); return [FIRCollectionReference referenceWithPath:path firestore:self]; } @@ -270,7 +271,7 @@ extern "C" NSString *const FIRFirestoreErrorDomain = @"FIRFirestoreErrorDomain"; FSTThrowInvalidArgument(@"Document path cannot be nil."); } [self ensureClientConfigured]; - FSTResourcePath *path = [FSTResourcePath pathWithString:documentPath]; + const ResourcePath path = ResourcePath::FromString(util::MakeStringView(documentPath)); return [FIRDocumentReference referenceWithPath:path firestore:self]; } |