File tree Expand file tree Collapse file tree 8 files changed +30
-11
lines changed
EmailAuth/FirebaseEmailAuthUI
UITests/FirebaseUISample.xcodeproj Expand file tree Collapse file tree 8 files changed +30
-11
lines changed Original file line number Diff line number Diff line change @@ -49,4 +49,9 @@ extern NSString *const FUIAuthBundleName;
49
49
*/
50
50
+ (UIImage *)imageNamed : (NSString *)name fromBundle : (nullable NSBundle *)bundle ;
51
51
52
+ /* * @fn isFirebasePerformanceAvailable
53
+ * @brief Used to work around https://github.com/firebase/firebase-ios-sdk/issues/2283
54
+ */
55
+ + (BOOL )isFirebasePerformanceAvailable ;
56
+
52
57
@end
Original file line number Diff line number Diff line change @@ -56,4 +56,8 @@ + (UIImage *)imageNamed:(NSString *)name fromBundleNameOrNil:(nullable NSString
56
56
return [UIImage imageWithContentsOfFile: path];
57
57
}
58
58
59
+ + (BOOL )isFirebasePerformanceAvailable {
60
+ return NSClassFromString (@" FIRPerformance" ) != nil ;
61
+ }
62
+
59
63
@end
Original file line number Diff line number Diff line change @@ -291,7 +291,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
291
291
cell.textField .returnKeyType = UIReturnKeyNext;
292
292
cell.textField .keyboardType = UIKeyboardTypeEmailAddress;
293
293
if (@available (iOS 11.0 , *)) {
294
- cell.textField .textContentType = UITextContentTypeUsername;
294
+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
295
+ cell.textField .textContentType = UITextContentTypeUsername;
296
+ }
295
297
}
296
298
[cell.textField addTarget: self
297
299
action: @selector (textFieldDidChange )
Original file line number Diff line number Diff line change @@ -182,7 +182,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
182
182
_emailField.autocorrectionType = UITextAutocorrectionTypeNo;
183
183
_emailField.autocapitalizationType = UITextAutocapitalizationTypeNone;
184
184
if (@available (iOS 11.0 , *)) {
185
- _emailField.textContentType = UITextContentTypeUsername;
185
+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
186
+ _emailField.textContentType = UITextContentTypeUsername;
187
+ }
186
188
}
187
189
[cell.textField addTarget: self
188
190
action: @selector (textFieldDidChange )
Original file line number Diff line number Diff line change @@ -258,7 +258,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
258
258
_emailField.autocorrectionType = UITextAutocorrectionTypeNo;
259
259
_emailField.autocapitalizationType = UITextAutocapitalizationTypeNone;
260
260
if (@available (iOS 11.0 , *)) {
261
- _emailField.textContentType = UITextContentTypeUsername;
261
+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
262
+ _emailField.textContentType = UITextContentTypeUsername;
263
+ }
262
264
}
263
265
} else if (indexPath.row == 1 ) {
264
266
cell.label .text = FUILocalizedString (kStr_Password );
@@ -268,7 +270,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
268
270
_passwordField.returnKeyType = UIReturnKeyNext;
269
271
_passwordField.keyboardType = UIKeyboardTypeDefault;
270
272
if (@available (iOS 11.0 , *)) {
271
- _passwordField.textContentType = UITextContentTypePassword;
273
+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
274
+ _passwordField.textContentType = UITextContentTypePassword;
275
+ }
272
276
}
273
277
}
274
278
[cell.textField addTarget: self
Original file line number Diff line number Diff line change @@ -268,7 +268,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
268
268
_emailField.autocorrectionType = UITextAutocorrectionTypeNo;
269
269
_emailField.autocapitalizationType = UITextAutocapitalizationTypeNone;
270
270
if (@available (iOS 11.0 , *)) {
271
- _emailField.textContentType = UITextContentTypeUsername;
271
+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
272
+ _emailField.textContentType = UITextContentTypeUsername;
273
+ }
272
274
}
273
275
} else if (indexPath.row == 1 ) {
274
276
cell.label .text = FUILocalizedString (kStr_Name );
@@ -292,7 +294,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
292
294
_passwordField.returnKeyType = UIReturnKeyNext;
293
295
_passwordField.keyboardType = UIKeyboardTypeDefault;
294
296
if (@available (iOS 11.0 , *)) {
295
- _passwordField.textContentType = UITextContentTypePassword;
297
+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
298
+ _passwordField.textContentType = UITextContentTypePassword;
299
+ }
296
300
}
297
301
}
298
302
[cell.textField addTarget: self
Original file line number Diff line number Diff line change @@ -222,7 +222,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
222
222
_passwordField.returnKeyType = UIReturnKeyNext;
223
223
_passwordField.keyboardType = UIKeyboardTypeDefault;
224
224
if (@available (iOS 11.0 , *)) {
225
- _passwordField.textContentType = UITextContentTypePassword;
225
+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
226
+ _passwordField.textContentType = UITextContentTypePassword;
227
+ }
226
228
}
227
229
[cell.textField addTarget: self
228
230
action: @selector (textFieldDidChange )
Original file line number Diff line number Diff line change 863
863
"\"leveldb\"",
864
864
"-framework",
865
865
"\"nanopb\"",
866
- "-framework",
867
- "\"openssl\"",
868
866
);
869
867
PRODUCT_BUNDLE_IDENTIFIER = com.firebase.FirebaseUISampleUITests;
870
868
PRODUCT_NAME = "$(TARGET_NAME)";
960
958
"\"leveldb\"",
961
959
"-framework",
962
960
"\"nanopb\"",
963
- "-framework",
964
- "\"openssl\"",
965
961
);
966
962
PRODUCT_BUNDLE_IDENTIFIER = com.firebase.FirebaseUISampleUITests;
967
963
PRODUCT_NAME = "$(TARGET_NAME)";
You can’t perform that action at this time.
0 commit comments