diff --git a/Example/Podfile b/Example/Podfile index 0a3b784e2b4..f2163082a51 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -8,7 +8,7 @@ target 'Core_Example_iOS' do # The next line is the forcing function for the Firebase pod. The Firebase # version's subspecs should depend on the component versions in their # corresponding podspec's. - pod 'Firebase/Core', '4.10.0' + pod 'Firebase/Core', '4.10.1' target 'Core_Tests_iOS' do inherit! :search_paths diff --git a/Firebase/Core/FIROptions.m b/Firebase/Core/FIROptions.m index bbfe5c0ec20..384ef21a36c 100644 --- a/Firebase/Core/FIROptions.m +++ b/Firebase/Core/FIROptions.m @@ -43,7 +43,7 @@ NSString *const kFIRLibraryVersionID = @"4" // Major version (one or more digits) @"00" // Minor version (exactly 2 digits) - @"16" // Build number (exactly 2 digits) + @"17" // Build number (exactly 2 digits) @"000"; // Fixed "000" // Plist file name. NSString *const kServiceInfoFileName = @"GoogleService-Info"; diff --git a/FirebaseCore.podspec b/FirebaseCore.podspec index 3c6fe5918a9..eec86050e19 100644 --- a/FirebaseCore.podspec +++ b/FirebaseCore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseCore' - s.version = '4.0.16' + s.version = '4.0.17' s.summary = 'Firebase Core for iOS' s.description = <<-DESC diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index e7d1c85659f..896dcfb16c6 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'FirebaseFirestore' - s.version = '0.10.2' + s.version = '0.10.3' s.summary = 'Google Cloud Firestore for iOS' s.description = <<-DESC diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md index 9b35ea36763..71b61efda16 100644 --- a/Firestore/CHANGELOG.md +++ b/Firestore/CHANGELOG.md @@ -4,6 +4,13 @@ "offline", causing getDocument() calls to resolve with cached results, rather than continuing to wait. +# v0.10.3 +- [fixed] Fixed a regression in the 4.10.0 Firebase iOS SDK release that + prevented the SDK from communicating with the backend before successfully + authenticating via Firebase Authentication or after unauthenticating and + re-authenticating. Reads and writes would silently be executed locally + but not sent to the backend. + # v0.10.2 - [changed] When you delete a FirebaseApp, the associated Firestore instances are now also deleted (#683). diff --git a/Firestore/Example/Podfile b/Firestore/Example/Podfile index bae557637f1..71afc2ba53c 100644 --- a/Firestore/Example/Podfile +++ b/Firestore/Example/Podfile @@ -1,7 +1,7 @@ # The next line is the forcing function for the Firebase pod. The Firebase # version's subspecs should depend on the component versions in their # corresponding podspec's. -pod 'Firebase/Core', '4.10.0' +pod 'Firebase/Core', '4.10.1' use_frameworks! platform :ios, '8.0' diff --git a/Firestore/Source/Local/FSTLevelDBMutationQueue.mm b/Firestore/Source/Local/FSTLevelDBMutationQueue.mm index 1f6484d26c4..575e98d2f11 100644 --- a/Firestore/Source/Local/FSTLevelDBMutationQueue.mm +++ b/Firestore/Source/Local/FSTLevelDBMutationQueue.mm @@ -94,7 +94,7 @@ @implementation FSTLevelDBMutationQueue { + (instancetype)mutationQueueWithUser:(const User &)user db:(std::shared_ptr)db serializer:(FSTLocalSerializer *)serializer { - NSString *userID = user.is_authenticated() ? util::WrapNSStringNoCopy(user.uid()) : @""; + NSString *userID = user.is_authenticated() ? util::WrapNSString(user.uid()) : @""; return [[FSTLevelDBMutationQueue alloc] initWithUserID:userID db:db serializer:serializer]; } @@ -103,7 +103,7 @@ - (instancetype)initWithUserID:(NSString *)userID db:(std::shared_ptr)db serializer:(FSTLocalSerializer *)serializer { if (self = [super init]) { - _userID = userID; + _userID = [userID copy]; _db = db; _serializer = serializer; } diff --git a/Firestore/Source/Remote/FSTDatastore.mm b/Firestore/Source/Remote/FSTDatastore.mm index cb4516ef9c2..3b536abf78c 100644 --- a/Firestore/Source/Remote/FSTDatastore.mm +++ b/Firestore/Source/Remote/FSTDatastore.mm @@ -97,7 +97,7 @@ - (instancetype)initWithDatabaseInfo:(const DatabaseInfo *)databaseInfo credentials:(CredentialsProvider *)credentials { if (self = [super init]) { _databaseInfo = databaseInfo; - NSString *host = util::WrapNSStringNoCopy(databaseInfo->host()); + NSString *host = util::WrapNSString(databaseInfo->host()); if (!databaseInfo->ssl_enabled()) { GRPCHost *hostConfig = [GRPCHost hostWithAddress:host]; hostConfig.secure = NO; @@ -319,7 +319,8 @@ - (void)invokeRPCWithFactory:(GRPCProtoCall * (^)(void))rpcFactory [FSTDatastore prepareHeadersForRPC:rpc databaseID:&self.databaseInfo->database_id() - token:(result.is_valid() ? result.token() : absl::string_view())]; + token:(result.user().is_authenticated() ? result.token() + : absl::string_view())]; [rpc start]; } }]; diff --git a/Firestore/Source/Remote/FSTSerializerBeta.mm b/Firestore/Source/Remote/FSTSerializerBeta.mm index 0fd7d335f0e..00391ec5211 100644 --- a/Firestore/Source/Remote/FSTSerializerBeta.mm +++ b/Firestore/Source/Remote/FSTSerializerBeta.mm @@ -152,8 +152,8 @@ - (FSTResourcePath *)decodedQueryPath:(NSString *)name { - (FSTResourcePath *)encodedResourcePathForDatabaseID:(const DatabaseId *)databaseID { return [FSTResourcePath pathWithSegments:@[ - @"projects", util::WrapNSStringNoCopy(databaseID->project_id()), @"databases", - util::WrapNSStringNoCopy(databaseID->database_id()) + @"projects", util::WrapNSString(databaseID->project_id()), @"databases", + util::WrapNSString(databaseID->database_id()) ]]; } diff --git a/Firestore/Source/Remote/FSTStream.mm b/Firestore/Source/Remote/FSTStream.mm index 6735df18323..44e3ef01a7e 100644 --- a/Firestore/Source/Remote/FSTStream.mm +++ b/Firestore/Source/Remote/FSTStream.mm @@ -297,9 +297,10 @@ - (void)resumeStartWithToken:(const Token &)token error:(NSError *)error { _rpc = [self createRPCWithRequestsWriter:self.requestsWriter]; [_rpc setResponseDispatchQueue:self.workerDispatchQueue.queue]; - [FSTDatastore prepareHeadersForRPC:_rpc - databaseID:&self.databaseInfo->database_id() - token:(token.is_valid() ? token.token() : absl::string_view())]; + [FSTDatastore + prepareHeadersForRPC:_rpc + databaseID:&self.databaseInfo->database_id() + token:(token.user().is_authenticated() ? token.token() : absl::string_view())]; FSTAssert(_callbackFilter == nil, @"GRX Filter must be nil"); _callbackFilter = [[FSTCallbackFilter alloc] initWithStream:self]; [_rpc startWithWriteable:_callbackFilter]; @@ -631,7 +632,7 @@ - (instancetype)initWithDatabase:(const DatabaseInfo *)database } - (GRPCCall *)createRPCWithRequestsWriter:(GRXWriter *)requestsWriter { - return [[GRPCCall alloc] initWithHost:util::WrapNSStringNoCopy(self.databaseInfo->host()) + return [[GRPCCall alloc] initWithHost:util::WrapNSString(self.databaseInfo->host()) path:@"/google.firestore.v1beta1.Firestore/Listen" requestsWriter:requestsWriter]; } @@ -716,7 +717,7 @@ - (instancetype)initWithDatabase:(const DatabaseInfo *)database } - (GRPCCall *)createRPCWithRequestsWriter:(GRXWriter *)requestsWriter { - return [[GRPCCall alloc] initWithHost:util::WrapNSStringNoCopy(self.databaseInfo->host()) + return [[GRPCCall alloc] initWithHost:util::WrapNSString(self.databaseInfo->host()) path:@"/google.firestore.v1beta1.Firestore/Write" requestsWriter:requestsWriter]; }