Skip to content

Merge Release 4.10.1 into Master #896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 9, 2018
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
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Firebase/Core/FIROptions.m
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion FirebaseCore.podspec
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion FirebaseFirestore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions Firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion Firestore/Example/Podfile
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
4 changes: 2 additions & 2 deletions Firestore/Source/Local/FSTLevelDBMutationQueue.mm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ @implementation FSTLevelDBMutationQueue {
+ (instancetype)mutationQueueWithUser:(const User &)user
db:(std::shared_ptr<DB>)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];
}
Expand All @@ -103,7 +103,7 @@ - (instancetype)initWithUserID:(NSString *)userID
db:(std::shared_ptr<DB>)db
serializer:(FSTLocalSerializer *)serializer {
if (self = [super init]) {
_userID = userID;
_userID = [userID copy];
_db = db;
_serializer = serializer;
}
Expand Down
5 changes: 3 additions & 2 deletions Firestore/Source/Remote/FSTDatastore.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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())];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI- I think this needs to be clang-formatted. I noticed it in my original commit, but if you clang-format, it reindents this whole block causing a bigger diff, so I didn't bother. But once you merge this into mater, perhaps we should immediately follow up with a clang-format fixup PR or something.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Actually I see you have a "fix lint" commit in here, so maybe you already took care of the issue. If so, ignore me.

[rpc start];
}
}];
Expand Down
4 changes: 2 additions & 2 deletions Firestore/Source/Remote/FSTSerializerBeta.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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())
]];
}

Expand Down
11 changes: 6 additions & 5 deletions Firestore/Source/Remote/FSTStream.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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];
}
Expand Down Expand Up @@ -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];
}
Expand Down