如何为wkwebview启用自动填充密码 [英] how do i enable autofill password for a wkwebview

查看:907
本文介绍了如何为wkwebview启用自动填充密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的wkwebview中启用自动填充密码。我似乎无法在网上找到有关如何执行此操作的任何文档或示例。

I'd like to enable the "Autofill Password" in my wkwebview. I can't seem to find any documentation or examples online on how to do this.

推荐答案

这实际上可以使用 1Password

添加扩展文件:


  • OnePasswordExtension.h

  • OnePasswordExtension.m

  • OnePasswordExtension.h
  • OnePasswordExtension.m

然后使用桥接头包含它们:

Then include them using a bridging header:

#importOnePasswordExtension.h

最后,您可以在项目中使用以下内容

Finally, you can use the following in your project

@IBAction func onePassword_btn(sender: AnyObject) {
    OnePasswordExtension.sharedExtension().fillLoginIntoWebView(self.webView, forViewController: self, sender: sender, completion: {(Bool) in
        // error handling
    })
}

这篇关于如何为wkwebview启用自动填充密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆