You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to configure the object FirebaseApp using the initialiser configure(name: String. options: FirebaseOptions)supplying an application name that contains an accent such asē` will cause an exception.
Steps to reproduce:
Running the following line will cause the exception App name should only contain Letters, Numbers, Underscores, and Dashes. to be thrown. FirebaseApp.configure(name: "hēllo", options: options)
Looking at the source code there is an if check looking for characters above and below a-z A-Z and 0-9.
FIRApp.m: 161 if (!((character >= 'a' && character <= 'z') || (character >= 'A' && character <= 'Z') || (character >= '0' && character <= '9') || character == '_' || character == '-')) { [NSException raise:kFirebaseCoreErrorDomain format:@"App name should only contain Letters, " @"Numbers, Underscores, and Dashes."]; }
Relevant Code:
let plistPath = Bundle.main.path(forResource: "MyGoogleServicePlist", ofType: "plist")
let googleService = try! PropertyListDecoder().decode(GoogleService.self, from: data)
let options = FirebaseOptions(googleAppID: googleService.appId, gcmSenderID: googleService.gcmId)
`FirebaseApp.configure(name: "hēllo", options: options)`
Due to a multi target workspace we are required to have custom names for the GoogleService-Info.plist which is why it contains a custom name in the sample above.
The text was updated successfully, but these errors were encountered:
[REQUIRED] Step 3: Describe the problem
When trying to configure the object FirebaseApp using the initialiser
configure(name:
String. options: FirebaseOptions)supplying an application name that contains an accent such as
ē` will cause an exception.Steps to reproduce:
Running the following line will cause the exception
App name should only contain Letters, Numbers, Underscores, and Dashes.
to be thrown.FirebaseApp.configure(name: "hēllo", options: options)
Looking at the source code there is an if check looking for characters above and below a-z A-Z and 0-9.
FIRApp.m: 161
if (!((character >= 'a' && character <= 'z') || (character >= 'A' && character <= 'Z') || (character >= '0' && character <= '9') || character == '_' || character == '-')) { [NSException raise:kFirebaseCoreErrorDomain format:@"App name should only contain Letters, " @"Numbers, Underscores, and Dashes."]; }
Relevant Code:
Due to a multi target workspace we are required to have custom names for the GoogleService-Info.plist which is why it contains a custom name in the sample above.
The text was updated successfully, but these errors were encountered: