【问题标题】:When does display the prompt that is "Would you like to save this password in your iCloud Keychain"?什么时候显示“您想将此密码保存在您的 iCloud 钥匙串中”的提示吗?
【发布时间】:2021-06-23 18:29:07
【问题描述】:

什么时候会显示提示“您想将此密码保存在您的 iCloud 钥匙串中”吗??

我正在实现钥匙串逻辑来保存密码。 但是,为应用程序密码创建钥匙串时不会显示此提示。 我需要使用另一个 kSecClass 项目吗?

enter image description here

【问题讨论】:

    标签: swift keychain


    【解决方案1】:

    您可以找到保存钥匙串密码的文档here

    func SecAddSharedWebCredential(_ fqdn: CFString, 
                                 _ account: CFString, 
                                 _ password: CFString?, 
                                 _ completionHandler: @escaping (CFError?) -> Void)
    
    • fqdn:需要密码的网站域名。
    • account:与此密码关联的帐户名。
    • password:要存储的密码。传递 NULL 以删除共享密码(如果存在)。
    • completionHandler:函数完成时调用的块。

    【讨论】:

    • 非常感谢!!是否仅在使用 Shared Web Credentials 和 kSecClassInternetPassword 时显示此提示?使用 kSecClassGenericPassword 时可以显示这个提示吗?
    猜你喜欢
    • 1970-01-01
    • 2019-11-01
    • 2015-02-15
    • 1970-01-01
    • 2020-04-05
    • 1970-01-01
    • 2017-07-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多