简体   繁体   English

无法获取 newPassword 以生成强密码并自动填充

[英]Cannot get newPassword to generate strong password and autofill

I'm trying to get autofill working.我正在尝试让自动填充工作。 Specifically, either of these experiences .具体来说, 这些经历中的任何一个。 The former being the one I'm more interested in, but two for the sake of having more than one example.前者是我更感兴趣的一个,但两个是为了有不止一个例子。

Everything is working except the strong password generation.除了生成强密码外,一切正常。

I've correctly configured my AASA, I've switched everything to SSL, textContentType is correctly set, I enabled the autofill provider entitlement (after reading more I'm turning it back off though since that's not what I want (same results)).我已经正确配置了我的 AASA,我已经将所有内容切换到 SSL,正确设置了 textContentType,我启用了自动填充提供程序的权利(阅读更多内容后我将其关闭,因为这不是我想要的(相同的结果)) . Is there something in info.plist i'm missing? info.plist 中是否有我遗漏的内容? I am using a keychain library to access the keychain?我正在使用钥匙串库来访问钥匙串? but I don't think that's it.但我不认为是这样。

Specifically I'm trying to get to this screen具体来说,我试图进入这个屏幕

Any suggestions of where to dig would also be appreciated.任何关于在哪里挖掘的建议也将不胜感激。 At this point I'm not sure if I'm doing something wrong, or if ios12 is new and doesn't work right yet.在这一点上,我不确定我是否做错了什么,或者 ios12 是新的并且还不能正常工作。

Relevant code?相关代码? (This is all I have in the 'code', am I missing somethign somewhere else?) (这就是我在“代码”中的全部内容,我是否在其他地方遗漏了什么?)

pwTF.textContentType = .newPassword
pwTF.passwordRules = UITextInputPasswordRules(descriptor: "required: upper; required: lower; required: digit; max-consecutive: 2; minlength: 16;")

Do you have a UITextField that has the usernameTextField.textContentType = .username on the same page?你有一个 UITextField 在同一页面上有usernameTextField.textContentType = .username吗? I only got the strong password suggestion after I added the username field.添加用户名字段后,我才得到强密码建议。

i guess it's heuristics based and if it can't find a username field it's unhappy?我猜它是基于启发式的,如果它找不到用户名字段,它会不高兴吗?

¯\\_(ツ)_/¯ ¯\\_(ツ)_/¯

I know it may be solved already for you but here is a solution for generations to come :)我知道它可能已经为你解决了,但这里有一个为未来几代人提供的解决方案:)

Sometimes it doesn't work cause your device have the keychain turned off.. go to Settings -> AppleID -> iCloud -> KeyChain .. and enable it .有时它不起作用,因为您的设备关闭了钥匙串.. 转到设置 -> AppleID -> iCloud -> 钥匙串 .. 并启用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM