Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d2ea3bc
FIS: Throw exception on incomplete Firebase config.
maksymmalyhin Jan 15, 2020
2f6898b
API docs updated.
maksymmalyhin Jan 15, 2020
501af60
FirebaseInstallations bump minor version: 1.1.0
maksymmalyhin Jan 15, 2020
381f9a9
Fix tests
maksymmalyhin Jan 15, 2020
1254d1a
Text fixed
maksymmalyhin Jan 15, 2020
45208a6
Make exception message more informative
maksymmalyhin Jan 15, 2020
060740c
Merge remote-tracking branch 'origin/master' into mm/fis-config
maksymmalyhin Jan 15, 2020
832adfa
Fix Remote Config tests.
maksymmalyhin Jan 15, 2020
dac08c6
Merge branch 'master' into mm/fis-config
maksymmalyhin Jan 15, 2020
9af869a
Tests updated to use GCMSenderID if projectID is not available.
maksymmalyhin Jan 15, 2020
83afada
Use `GCMSenderID` when `projectID` is not available.
maksymmalyhin Jan 15, 2020
5a74f2e
./scripts/style.sh
maksymmalyhin Jan 15, 2020
724ce8f
Comments
maksymmalyhin Jan 15, 2020
bff6efd
GCMSenderID and projectID validation updated.
maksymmalyhin Jan 16, 2020
45d1a6a
Comment
maksymmalyhin Jan 16, 2020
43934b5
FirebaseInstallations: version bump to 1.0.1.
maksymmalyhin Jan 16, 2020
3f58525
FIS changelog
maksymmalyhin Jan 16, 2020
6fbb14d
FirebaseInstallations: version bump to 1.1.0
maksymmalyhin Jan 16, 2020
1761ed6
FIS and Core changelogs.
maksymmalyhin Jan 16, 2020
22c527d
Changelogs remove GCMSenderID
maksymmalyhin Jan 16, 2020
0fd43bf
Typo
maksymmalyhin Jan 16, 2020
e1d0cf2
Typo
maksymmalyhin Jan 16, 2020
87922d5
fix link
maksymmalyhin Jan 16, 2020
d7ef952
Revert Core changelog
maksymmalyhin Jan 16, 2020
c68b86c
FIS changelog fix.
maksymmalyhin Jan 16, 2020
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 FirebaseCore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# v6.6.0 -- M62
- [changed] Reorganized directory structure.
- [changed] [Firebase Installations](../FirebaseInstallations/CHANGELOG.md) throws an exception when there are missing required `FirebaseOptions` parameters (`APIKey`, `googleAppID`, and `projectID`). Please make sure your `GoogleServices-Info.plist` (or `FirebaseOptions` if you configure Firebase in code) are up to date. The file and settings can be downloaded from the [Firebase Console](https://console.firebase.google.com/). (#4683)
- [changed] The following SDKs introduce a new transitive dependency on the [Firebase Installations API](https://console.cloud.google.com/apis/library/firebaseinstallations.googleapis.com):
- Analytics
- Cloud Messaging
Expand Down
4 changes: 4 additions & 0 deletions FirebaseInstallations/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v1.1.0 -- M62.1

- [changed] Throw an exception when there are missing required `FirebaseOptions` parameters (`APIKey`, `googleAppID`, and `projectID`). Please make sure your `GoogleServices-Info.plist` (or `FirebaseOptions` if you configure Firebase in code) are up to date. The file and settings can be downloaded from the [Firebase Console](https://console.firebase.google.com/). (#4683)

# v1.0.0 -- M62

- [added] The Firebase Installations Service is an infrastructure service for Firebase services that creates unique identifiers and authentication tokens for Firebase clients (called "Firebase Installations") enabling Firebase Targeting, i.e. interoperation between Firebase services.
Expand Down
22 changes: 13 additions & 9 deletions FirebaseInstallations/Source/Library/FIRInstallations.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,24 @@ + (void)validateAppOptions:(FIROptions *)appOptions appName:(NSString *)appName
if (appOptions.googleAppID.length < 1) {
[missingFields addObject:@"`FirebaseOptions.googleAppID`"];
}
if (appOptions.GCMSenderID.length < 1) {
[missingFields addObject:@"`FirebaseOptions.GCMSenderID`"];

// TODO(#4692): Check for `appOptions.projectID.length < 1` only.
// We can use `GCMSenderID` instead of `projectID` temporary.
if (appOptions.projectID.length < 1 && appOptions.GCMSenderID.length < 1) {
[missingFields addObject:@"`FirebaseOptions.projectID`"];
}

if (missingFields.count > 0) {
[NSException
raise:kFirebaseInstallationsErrorDomain
format:@"%@[%@] Could not configure Firebase Installations due to invalid FirebaseApp "
@"options. The following parameters are nil or empty: %@. If you use "
@"GoogleServices-Info.plist please download the most recent version from Firebase "
@"Console. If you configure Firebase in code, please make sure you specify all "
@"required parameters.",
kFIRLoggerInstallations, kFIRInstallationsMessageCodeInvalidFirebaseAppOptions,
[missingFields componentsJoinedByString:@", "]];
format:
@"%@[%@] Could not configure Firebase Installations due to invalid FirebaseApp "
@"options. The following parameters are nil or empty: %@. If you use "
@"GoogleServices-Info.plist please download the most recent version from the Firebase "
@"Console. If you configure Firebase in code, please make sure you specify all "
@"required parameters.",
kFIRLoggerInstallations, kFIRInstallationsMessageCodeInvalidFirebaseAppOptions,
[missingFields componentsJoinedByString:@", "]];
}
}

Expand Down
13 changes: 12 additions & 1 deletion FirebaseInstallations/Source/Tests/Unit/FIRInstallationsTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,18 @@ - (void)testInitWhenGoogleAppIDMissingThenThrows {
- (void)testInitWhenGCMSenderIDMissingThenThrows {
FIROptions *options = [self.appOptions copy];
options.GCMSenderID = @"";
XCTAssertThrows([self createInstallationsWithAppOptions:options appName:@"emptyGCMSenderID"]);
XCTAssertNoThrow([self createInstallationsWithAppOptions:options appName:@"emptyGCMSenderID"]);
}

- (void)testInitWhenProjectIDAndGCMSenderIDMissingThenNoThrow {
FIROptions *options = [self.appOptions copy];
options.GCMSenderID = @"";

options.projectID = nil;
XCTAssertThrows([self createInstallationsWithAppOptions:options appName:@"missingProjectID"]);

options.projectID = @"";
XCTAssertThrows([self createInstallationsWithAppOptions:options appName:@"emptyProjectID"]);
}

- (void)testInitWhenAppNameMissingThenThrows {
Expand Down