{"id":18456741,"url":"https://github.com/alflix/easywebview","last_synced_at":"2025-08-23T06:38:30.302Z","repository":{"id":50278986,"uuid":"188070132","full_name":"alflix/EasyWebView","owner":"alflix","description":"use WKWebView easily!","archived":false,"fork":false,"pushed_at":"2020-01-13T15:57:32.000Z","size":473,"stargazers_count":12,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-02T12:23:34.434Z","etag":null,"topics":["webview","wkwebview","wkwebview-javascript-bridge"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alflix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-22T15:52:55.000Z","updated_at":"2024-07-24T13:18:42.000Z","dependencies_parsed_at":"2022-09-24T10:11:48.350Z","dependency_job_id":null,"html_url":"https://github.com/alflix/EasyWebView","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/alflix/EasyWebView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alflix%2FEasyWebView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alflix%2FEasyWebView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alflix%2FEasyWebView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alflix%2FEasyWebView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alflix","download_url":"https://codeload.github.com/alflix/EasyWebView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alflix%2FEasyWebView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745679,"owners_count":24813521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["webview","wkwebview","wkwebview-javascript-bridge"],"created_at":"2024-11-06T08:12:36.061Z","updated_at":"2025-08-23T06:38:30.275Z","avatar_url":"https://github.com/alflix.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://tva1.sinaimg.cn/large/006tNbRwgy1g9uyopblfsj310g082jrw.jpg\"\u003e\n\n[![Version](https://img.shields.io/cocoapods/v/EasyWebView.svg?style=flat)](http://cocoapods.org/pods/EasyWebView)\n[![License](https://img.shields.io/cocoapods/l/EasyWebView.svg?style=flat)](http://cocoapods.org/pods/EasyWebView)\n[![Platform](https://img.shields.io/cocoapods/p/EasyWebView.svg?style=flat)](http://cocoapods.org/pods/EasyWebView)\n![Swift](https://img.shields.io/badge/%20in-swift%205.0-orange.svg)\n\n## Introduction\n\nEasyWebView enables application to use WKWebView easily, in UIViewController or UITableViewCell.\n\n## Features\n\n- one line code to use WKWebView by loading url or html string.\n- smart and easy to adjust height of WebView in UITableViewCell.\n- easy and safe to use ScriptMessageHandler.\n- support common WKWebView feature.\n\n## Installation \n\n### Requirements \n\n- Swift 4.2 \n- iOS 9.0\n\n### Cocoapods\n\nEasyWebView is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:\n\n```ruby\nplatform :ios, '9.0'\npod \"EasyWebView\"\n```\n\n\u003e If you want to load http url, Don't forget the Privacy Description in `info.plist`.\n\n```xml\n\u003ckey\u003eNSAppTransportSecurity\u003c/key\u003e\n\u003cdict\u003e\n    \u003ckey\u003eNSAllowsArbitraryLoads\u003c/key\u003e\n    \u003ctrue/\u003e\n\u003c/dict\u003e\n```\n\n## Usage \n\n**Use WebViewController**\n\n```swift \nclass ViewController: UIViewController {\n    func pushToWebViewController() {\n        pushToWebByLoadingURL(\"google.com\", title: \"Google\")\n    }\n}\n```\n\n**Override WebViewController**\n\n```swift \nclass CustomWebViewController: WebViewController {\n    override var isShowProgressView: Bool { return false }\n    override var isShowTitle: Bool { return false }\n}\n```\n\n**Use WebViewCell**\n\n```swift \nclass ViewController: UITableViewController {\n    private var webCellHeight: CGFloat = 300\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        tableView.register(WebViewCell.self, forCellReuseIdentifier: String(describing: WebViewCell.self))\n    }\n}\n\nextension ViewController {\n    override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -\u003e CGFloat {\n        return webCellHeight\n    }\n\n    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -\u003e UITableViewCell {\n        let cell = tableView.dequeueReusableCell(withClass: WebViewCell.self, for: indexPath)\n        // test url and scriptNames\n        cell.setupURLString(\"https://test.com\", delegate: self, isAddObservers: true)\n        cell.webView.addScriptMessageHandler(scriptNames: [\"test\"]) { (_, message) in\n            print(\"😄: \\(message.body)\")\n        }\n        return cell\n    }\n\n    override func scrollViewDidScroll(_ scrollView: UIScrollView) {\n        tableView.fixWebViewCellRenderingWhite()\n    }\n}\n```\n\n## Author\n\nDoes your organization or project use EasyWebView? Please let me know by email. John, jieyuanz24@gmail.com .\n\n## License \n\nEasyWebView is available under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falflix%2Feasywebview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falflix%2Feasywebview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falflix%2Feasywebview/lists"}