How to detect when user used Password AutoFill on a UITextField

前端 未结 7 2181
半阙折子戏
半阙折子戏 2020-12-10 03:26

I\'ve implemented all the app and server changes necessary to support Password Autofill on iOS 11, and it works well. I\'d like it to work a little better.

My usern

7条回答
  •  长情又很酷
    2020-12-10 04:04

    I'd like to trigger this on behalf of the user.

    If this is your primary goal, I'm doing a little different approach here.

    Upon showing the login form, I first check iCloud Keychain with SecRequestSharedWebCredential. If the closure returns a credentials, which means user's intent is to login with it, then I automatically login for him/her. Otherwise, make the login text filed becomeFirstResponder().

    This approach does not support third-party password manager, but most people use iCloud Keychain I believe.

提交回复
热议问题