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;
4949 */
5050+ (UIImage *)imageNamed : (NSString *)name fromBundle : (nullable NSBundle *)bundle ;
5151
52+ /* * @fn isFirebasePerformanceAvailable
53+ * @brief Used to work around https://github.com/firebase/firebase-ios-sdk/issues/2283
54+ */
55+ + (BOOL )isFirebasePerformanceAvailable ;
56+
5257@end
Original file line number Diff line number Diff line change @@ -56,4 +56,8 @@ + (UIImage *)imageNamed:(NSString *)name fromBundleNameOrNil:(nullable NSString
5656 return [UIImage imageWithContentsOfFile: path];
5757}
5858
59+ + (BOOL )isFirebasePerformanceAvailable {
60+ return NSClassFromString (@" FIRPerformance" ) != nil ;
61+ }
62+
5963@end
Original file line number Diff line number Diff line change @@ -241,7 +241,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
241241 cell.textField .returnKeyType = UIReturnKeyNext;
242242 cell.textField .keyboardType = UIKeyboardTypeEmailAddress;
243243 if (@available (iOS 11.0 , *)) {
244- cell.textField .textContentType = UITextContentTypeUsername;
244+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
245+ cell.textField .textContentType = UITextContentTypeUsername;
246+ }
245247 }
246248 [cell.textField addTarget: self
247249 action: @selector (textFieldDidChange )
Original file line number Diff line number Diff line change @@ -182,7 +182,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
182182 _emailField.autocorrectionType = UITextAutocorrectionTypeNo;
183183 _emailField.autocapitalizationType = UITextAutocapitalizationTypeNone;
184184 if (@available (iOS 11.0 , *)) {
185- _emailField.textContentType = UITextContentTypeUsername;
185+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
186+ _emailField.textContentType = UITextContentTypeUsername;
187+ }
186188 }
187189 [cell.textField addTarget: self
188190 action: @selector (textFieldDidChange )
Original file line number Diff line number Diff line change @@ -257,7 +257,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
257257 _emailField.autocorrectionType = UITextAutocorrectionTypeNo;
258258 _emailField.autocapitalizationType = UITextAutocapitalizationTypeNone;
259259 if (@available (iOS 11.0 , *)) {
260- _emailField.textContentType = UITextContentTypeUsername;
260+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
261+ _emailField.textContentType = UITextContentTypeUsername;
262+ }
261263 }
262264 } else if (indexPath.row == 1 ) {
263265 cell.label .text = FUILocalizedString (kStr_Password );
@@ -267,7 +269,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
267269 _passwordField.returnKeyType = UIReturnKeyNext;
268270 _passwordField.keyboardType = UIKeyboardTypeDefault;
269271 if (@available (iOS 11.0 , *)) {
270- _passwordField.textContentType = UITextContentTypePassword;
272+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
273+ _passwordField.textContentType = UITextContentTypePassword;
274+ }
271275 }
272276 }
273277 [cell.textField addTarget: self
Original file line number Diff line number Diff line change @@ -268,7 +268,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
268268 _emailField.autocorrectionType = UITextAutocorrectionTypeNo;
269269 _emailField.autocapitalizationType = UITextAutocapitalizationTypeNone;
270270 if (@available (iOS 11.0 , *)) {
271- _emailField.textContentType = UITextContentTypeUsername;
271+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
272+ _emailField.textContentType = UITextContentTypeUsername;
273+ }
272274 }
273275 } else if (indexPath.row == 1 ) {
274276 cell.label .text = FUILocalizedString (kStr_Name );
@@ -292,7 +294,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
292294 _passwordField.returnKeyType = UIReturnKeyNext;
293295 _passwordField.keyboardType = UIKeyboardTypeDefault;
294296 if (@available (iOS 11.0 , *)) {
295- _passwordField.textContentType = UITextContentTypePassword;
297+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
298+ _passwordField.textContentType = UITextContentTypePassword;
299+ }
296300 }
297301 }
298302 [cell.textField addTarget: self
Original file line number Diff line number Diff line change @@ -222,7 +222,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
222222 _passwordField.returnKeyType = UIReturnKeyNext;
223223 _passwordField.keyboardType = UIKeyboardTypeDefault;
224224 if (@available (iOS 11.0 , *)) {
225- _passwordField.textContentType = UITextContentTypePassword;
225+ if (![FUIAuthUtils isFirebasePerformanceAvailable ]) {
226+ _passwordField.textContentType = UITextContentTypePassword;
227+ }
226228 }
227229 [cell.textField addTarget: self
228230 action: @selector (textFieldDidChange )
Original file line number Diff line number Diff line change 863863 "\"leveldb\"",
864864 "-framework",
865865 "\"nanopb\"",
866- "-framework",
867- "\"openssl\"",
868866 );
869867 PRODUCT_BUNDLE_IDENTIFIER = com.firebase.FirebaseUISampleUITests;
870868 PRODUCT_NAME = "$(TARGET_NAME)";
960958 "\"leveldb\"",
961959 "-framework",
962960 "\"nanopb\"",
963- "-framework",
964- "\"openssl\"",
965961 );
966962 PRODUCT_BUNDLE_IDENTIFIER = com.firebase.FirebaseUISampleUITests;
967963 PRODUCT_NAME = "$(TARGET_NAME)";
You can’t perform that action at this time.
0 commit comments