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 b472f0c328f..e342b803ef9 100644 --- a/Firestore/CHANGELOG.md +++ b/Firestore/CHANGELOG.md @@ -1,5 +1,12 @@ # Unreleased +# 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 248ef9a67d8..24dac60455a 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 a6029ee732e..ce2439b6b75 100644 --- a/Firestore/Source/Remote/FSTDatastore.mm +++ b/Firestore/Source/Remote/FSTDatastore.mm @@ -92,7 +92,7 @@ - (instancetype)initWithDatabaseInfo:(const DatabaseInfo *)databaseInfo credentials:(id)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; @@ -313,7 +313,7 @@ - (void)invokeRPCWithFactory:(GRPCProtoCall * (^)(void))rpcFactory [FSTDatastore prepareHeadersForRPC:rpc databaseID:&self.databaseInfo->database_id() - token:(result.is_valid() ? result.token() + 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 ceb05010740..5445308748c 100644 --- a/Firestore/Source/Remote/FSTSerializerBeta.mm +++ b/Firestore/Source/Remote/FSTSerializerBeta.mm @@ -149,8 +149,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 a9aa245ad4f..69ce7fd70f4 100644 --- a/Firestore/Source/Remote/FSTStream.mm +++ b/Firestore/Source/Remote/FSTStream.mm @@ -297,7 +297,7 @@ - (void)resumeStartWithToken:(const Token &)token error:(NSError *)error { [FSTDatastore prepareHeadersForRPC:_rpc databaseID:&self.databaseInfo->database_id() - token:(token.is_valid() ? token.token() : absl::string_view())]; + 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]; @@ -629,7 +629,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]; } @@ -714,7 +714,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]; }