Skip to content
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
1 change: 1 addition & 0 deletions FirebaseInstallations/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- [changed] Mac OS Keychain storage changes: use a unique (per app) Keychain Service name to isolate Keychain items for different Mac OS applications.
NOTE: Installation Identifiers created by previous versions will be reset on Mac OS which can affect e.g. A/B Testing variants or debug device targeting for Firebase Messaging.
iOS, TVOS and watchOS Installation Identifiers will not be affected. (#5603)
- [changed] More readable server error console messages. (#5654)

# v1.2.0 -- M69

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ + (FIRInstallationsErrorCode)errorCodeWithHTTPCode:(NSInteger)HTTPCode {
+ (NSDictionary *)userInfoWithHTTPResponse:(NSHTTPURLResponse *)HTTPResponse
data:(nullable NSData *)data {
NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSString *failureReason = [NSString
stringWithFormat:@"The server responded with an error. HTTP response: %@\nResponse body: %@",
HTTPResponse, responseString];
NSString *failureReason =
[NSString stringWithFormat:@"The server responded with an error: \n - URL: %@ \n - HTTP "
@"status code: %ld \n - Response body: %@",
HTTPResponse.URL, (long)HTTPResponse.statusCode, responseString];
return @{NSLocalizedFailureReasonErrorKey : failureReason};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ - (FIRInstallationsItem *)createInstallationWithFID:(NSString *)FID
if ([self doesRegistrationErrorRequireConfigChange:error]) {
FIRLogError(kFIRLoggerInstallations,
kFIRInstallationsMessageCodeInvalidFirebaseConfiguration,
@"Firebase Installation registration failed for app with name: %@, error: "
@"Firebase Installation registration failed for app with name: %@, error:\n"
@"%@\nPlease make sure you use valid GoogleService-Info.plist",
self.appName, error);
self.appName, error.userInfo[NSLocalizedFailureReasonErrorKey]);
}
})
.then(^id(FIRInstallationsItem *registeredInstallation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ - (void)testUserInfoContainsResponseData {
XCTAssertTrue([failureReason containsString:HTTPResponse.URL.absoluteString]);
XCTAssertTrue([failureReason containsString:@(HTTPResponse.statusCode).stringValue]);
XCTAssertTrue([failureReason containsString:@(HTTPResponse.statusCode).stringValue]);
XCTAssertTrue([failureReason containsString:@"header1"]);
XCTAssertTrue([failureReason containsString:@"value1"]);

// Validate response data content.
XCTAssertTrue([failureReason containsString:@"invalid request"]);
Expand Down