Skip to content

Commit 43d928e

Browse files
authored
Allow dash character in FIRApp's name. (#19)
Since Google Cloud Projects Project IDs are allowed to use a dash, they should also be allowed in FIRApp's name.
1 parent 378d688 commit 43d928e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Example/Core/Tests/FIRAppTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
extern NSString *const kUniqueInstallFileName;
2121

2222
NSString *const kFIRTestAppName1 = @"test_app_name_1";
23-
NSString *const kFIRTestAppName2 = @"test_app_name_2";
23+
NSString *const kFIRTestAppName2 = @"test-app-name-2";
2424

2525
@interface FIRApp (TestInternal)
2626

FirebaseCore/Core/FIRApp.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ + (void)configureWithName:(NSString *)name options:(FIROptions *)options {
141141
char character = [lowerCaseName characterAtIndex:charIndex];
142142
if (!((character >= 'a' && character <= 'z')
143143
|| (character >= '0' && character <= '9')
144-
|| character == '_')) {
144+
|| character == '_'
145+
|| character == '-')) {
145146
[NSException raise:kFirebaseCoreErrorDomain format:@"App name should only contain Letters, "
146-
@"Numbers and Underscore."];
147+
@"Numbers, Underscores, and Dashes."];
147148
}
148149
}
149150

0 commit comments

Comments
 (0)