Skip to content

Revert "Don't use password autofill if Performance is linked" #682

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 1 commit into from
May 18, 2019
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
5 changes: 0 additions & 5 deletions Auth/FirebaseAuthUI/FUIAuthUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,4 @@ extern NSString *const FUIAuthBundleName;
*/
+ (UIImage *)imageNamed:(NSString *)name fromBundle:(nullable NSBundle *)bundle;

/** @fn isFirebasePerformanceAvailable
* @brief Used to work around https://github.com/firebase/firebase-ios-sdk/issues/2283
*/
+ (BOOL)isFirebasePerformanceAvailable;

@end
4 changes: 0 additions & 4 deletions Auth/FirebaseAuthUI/FUIAuthUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,4 @@ + (UIImage *)imageNamed:(NSString *)name fromBundleNameOrNil:(nullable NSString
return [UIImage imageWithContentsOfFile:path];
}

+ (BOOL)isFirebasePerformanceAvailable {
return NSClassFromString(@"FIRPerformance") != nil;
}

@end
4 changes: 1 addition & 3 deletions EmailAuth/FirebaseEmailAuthUI/FUIEmailEntryViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
cell.textField.returnKeyType = UIReturnKeyNext;
cell.textField.keyboardType = UIKeyboardTypeEmailAddress;
if (@available(iOS 11.0, *)) {
if (![FUIAuthUtils isFirebasePerformanceAvailable]) {
cell.textField.textContentType = UITextContentTypeUsername;
}
cell.textField.textContentType = UITextContentTypeUsername;
}
[cell.textField addTarget:self
action:@selector(textFieldDidChange)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
_emailField.autocorrectionType = UITextAutocorrectionTypeNo;
_emailField.autocapitalizationType = UITextAutocapitalizationTypeNone;
if (@available(iOS 11.0, *)) {
if (![FUIAuthUtils isFirebasePerformanceAvailable]) {
_emailField.textContentType = UITextContentTypeUsername;
}
_emailField.textContentType = UITextContentTypeUsername;
}
[cell.textField addTarget:self
action:@selector(textFieldDidChange)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
_emailField.autocorrectionType = UITextAutocorrectionTypeNo;
_emailField.autocapitalizationType = UITextAutocapitalizationTypeNone;
if (@available(iOS 11.0, *)) {
if (![FUIAuthUtils isFirebasePerformanceAvailable]) {
_emailField.textContentType = UITextContentTypeUsername;
}
_emailField.textContentType = UITextContentTypeUsername;
}
} else if (indexPath.row == 1) {
cell.label.text = FUILocalizedString(kStr_Password);
Expand All @@ -270,9 +268,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
_passwordField.returnKeyType = UIReturnKeyNext;
_passwordField.keyboardType = UIKeyboardTypeDefault;
if (@available(iOS 11.0, *)) {
if (![FUIAuthUtils isFirebasePerformanceAvailable]) {
_passwordField.textContentType = UITextContentTypePassword;
}
_passwordField.textContentType = UITextContentTypePassword;
}
}
[cell.textField addTarget:self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
_emailField.autocorrectionType = UITextAutocorrectionTypeNo;
_emailField.autocapitalizationType = UITextAutocapitalizationTypeNone;
if (@available(iOS 11.0, *)) {
if (![FUIAuthUtils isFirebasePerformanceAvailable]) {
_emailField.textContentType = UITextContentTypeUsername;
}
_emailField.textContentType = UITextContentTypeUsername;
}
} else if (indexPath.row == 1) {
cell.label.text = FUILocalizedString(kStr_Name);
Expand All @@ -294,9 +292,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
_passwordField.returnKeyType = UIReturnKeyNext;
_passwordField.keyboardType = UIKeyboardTypeDefault;
if (@available(iOS 11.0, *)) {
if (![FUIAuthUtils isFirebasePerformanceAvailable]) {
_passwordField.textContentType = UITextContentTypePassword;
}
_passwordField.textContentType = UITextContentTypePassword;
}
}
[cell.textField addTarget:self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
_passwordField.returnKeyType = UIReturnKeyNext;
_passwordField.keyboardType = UIKeyboardTypeDefault;
if (@available(iOS 11.0, *)) {
if (![FUIAuthUtils isFirebasePerformanceAvailable]) {
_passwordField.textContentType = UITextContentTypePassword;
}
_passwordField.textContentType = UITextContentTypePassword;
}
[cell.textField addTarget:self
action:@selector(textFieldDidChange)
Expand Down