From 479946a902c8e71c1dbc47b40bf6b55cd2579ed4 Mon Sep 17 00:00:00 2001 From: Jorge Leandro Perez Date: Fri, 13 Jul 2018 09:54:13 -0300 Subject: [PATCH 1/3] Login2FAViewController: Enabling iOS 12 OTP Autofill --- WordPressAuthenticator/Signin/Login2FAViewController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WordPressAuthenticator/Signin/Login2FAViewController.swift b/WordPressAuthenticator/Signin/Login2FAViewController.swift index 296ca5ad6..531863c1c 100644 --- a/WordPressAuthenticator/Signin/Login2FAViewController.swift +++ b/WordPressAuthenticator/Signin/Login2FAViewController.swift @@ -103,6 +103,10 @@ class Login2FAViewController: LoginViewController, NUXKeyboardResponder, UITextF /// @objc func configureTextFields() { verificationCodeField.contentInsets = WPStyleGuide.edgeInsetForLoginTextFields() + + if #available(iOS 12, *) { + verificationCodeField.textContentType = .oneTimeCode + } } /// Configures the appearance and state of the submit button. From 162a728f7b68885e6b2e76f46926629a4e8dec47 Mon Sep 17 00:00:00 2001 From: Jorge Leandro Perez Date: Fri, 13 Jul 2018 14:09:04 -0300 Subject: [PATCH 2/3] Login2FAViewController: Adding Swift 4.2 check --- WordPressAuthenticator/Signin/Login2FAViewController.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WordPressAuthenticator/Signin/Login2FAViewController.swift b/WordPressAuthenticator/Signin/Login2FAViewController.swift index 531863c1c..8f0ffe4c2 100644 --- a/WordPressAuthenticator/Signin/Login2FAViewController.swift +++ b/WordPressAuthenticator/Signin/Login2FAViewController.swift @@ -104,9 +104,11 @@ class Login2FAViewController: LoginViewController, NUXKeyboardResponder, UITextF @objc func configureTextFields() { verificationCodeField.contentInsets = WPStyleGuide.edgeInsetForLoginTextFields() +#if swift(>=4.2) if #available(iOS 12, *) { verificationCodeField.textContentType = .oneTimeCode } +#endif } /// Configures the appearance and state of the submit button. From b834110c53f0aaa024c10559329e17ecce39339d Mon Sep 17 00:00:00 2001 From: Jorge Leandro Perez Date: Mon, 16 Jul 2018 09:41:50 -0300 Subject: [PATCH 3/3] Updating WordPressAuthenticator to Mark 1.0.3 --- WordPressAuthenticator.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressAuthenticator.podspec b/WordPressAuthenticator.podspec index 9b027e478..506645f91 100644 --- a/WordPressAuthenticator.podspec +++ b/WordPressAuthenticator.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressAuthenticator" - s.version = "1.0.2" + s.version = "1.0.3" s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps." s.description = <<-DESC