{"id":20604889,"url":"https://github.com/allaboutapps/webviewcontroller","last_synced_at":"2025-06-12T15:34:17.071Z","repository":{"id":146844063,"uuid":"255843657","full_name":"allaboutapps/WebViewController","owner":"allaboutapps","description":null,"archived":false,"fork":false,"pushed_at":"2020-06-02T10:20:07.000Z","size":613,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-06T16:54:05.729Z","etag":null,"topics":["id-allaboutapps-ios"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/allaboutapps.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-15T07:49:31.000Z","updated_at":"2021-09-28T12:31:11.000Z","dependencies_parsed_at":"2023-07-15T13:00:21.208Z","dependency_job_id":null,"html_url":"https://github.com/allaboutapps/WebViewController","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/allaboutapps/WebViewController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allaboutapps%2FWebViewController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allaboutapps%2FWebViewController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allaboutapps%2FWebViewController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allaboutapps%2FWebViewController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allaboutapps","download_url":"https://codeload.github.com/allaboutapps/WebViewController/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allaboutapps%2FWebViewController/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259493935,"owners_count":22866415,"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","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":["id-allaboutapps-ios"],"created_at":"2024-11-16T09:25:30.217Z","updated_at":"2025-06-12T15:34:17.019Z","avatar_url":"https://github.com/allaboutapps.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebViewController\n\nA WebViewController to display external and local content written in swift 5.0.\n\nsupported iOS Version +9.0\n\n## Usage\n\nThe `WebViewController` needs to be initialized with a `ContentType`.\nContentType can either be an external URL, a local HTML file in the application bundle or an HTML string.\n\n```swift\nlet url = NSURL(string: \"https://apple.com\")!\nlet webView = WebViewController(content: .ExternalURL(url: url)) { controller in\n\tcontroller.dismissViewControllerAnimated(true, completion: nil)\n}\npresentViewController(webView, animated: true, completion: nil)\n```\n\n### Configuration\n\nThe WebViewController can be configured to show progress and a navigation toolbar, as well as adopt to a specific tint color.\n\n```swift \nwebView.showLoadingProgess = true\nwebView.showToolBar = true\nwebView.tintColor = .redColor()\n```\n\n### Custom CSS for HTML pages\n\nWebViewController support a custom CSS to style your HTML content.\nCall `addCSS:bundle:` to inject a new CSS style.\n\n## App Transport Security (ATS)\n\n### Since iOS 9 HTTPS and TLSv1.2 is required!\n\n\u003e App Transport Security (ATS) lets an app add a declaration to its Info.plist file that specifies the domains with which it needs secure communication. ATS prevents accidental disclosure, provides secure default behavior, and is easy to adopt. You should adopt ATS as soon as possible, regardless of whether you’re creating a new app or updating an existing one.\n\n\u003e If you’re developing a new app, you should use HTTPS exclusively. If you have an existing app, you should use HTTPS as much as you can right now, and create a plan for migrating the rest of your app as soon as possible.\n\u003e If you want to display websites without https you have to enter the basepath in your ```Info.plist ```\n\n```bash\n\u003ckey\u003eNSAppTransportSecurity\u003c/key\u003e\n\u003cdict\u003e\n  \u003ckey\u003eNSExceptionDomains\u003c/key\u003e\n  \u003cdict\u003e\n    \u003ckey\u003eyourserver.com\u003c/key\u003e\n    \u003cdict\u003e\n      \u003c!--Include to allow subdomains--\u003e\n      \u003ckey\u003eNSIncludesSubdomains\u003c/key\u003e\n      \u003ctrue/\u003e\n      \u003c!--Include to allow HTTP requests--\u003e\n      \u003ckey\u003eNSTemporaryExceptionAllowsInsecureHTTPLoads\u003c/key\u003e\n      \u003ctrue/\u003e\n      \u003c!--Include to specify minimum TLS version--\u003e\n      \u003ckey\u003eNSTemporaryExceptionMinimumTLSVersion\u003c/key\u003e\n      \u003cstring\u003eTLSv1.1\u003c/string\u003e\n    \u003c/dict\u003e\n  \u003c/dict\u003e\n\u003c/dict\u003e\n```\n\nFor more information about ATS go to:\n\u003chttp://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11\u003e\n\n## Install with Carthage\n\nTo integrate WebViewController into your Xcode project using Carthage, specify it in your ```Cartfile```\n\n```\ngithub \"allaboutapps/DataSource\", ~\u003e 4.1\n```\nThis framework has to build with xcode8+\n\n## Version Compatibility\n\nCurrent Swift compatibility breakdown:\n\n| Swift Version | Framework Version |\n| ------------- | ----------------- |\n| 5.2           | 4.1               |\n| 5.0           | 3.1               |\n| 4.0           | 3.0               |\n| 3.0\t          | swift3          \t|\n| 2.3\t          | 1.2          \t\t  |\n\n## Tests\n\nOpen the Xcode project and press `⌘-U` to run the tests.\n\nAlternatively, all tests can be run from the terminal using [xctool](https://github.com/facebook/xctool).\n\n```bash\nxctool -scheme OAuthTests -sdk iphonesimulator test\n```\n\n## Contact\n\nFeel free to get in touch.\n\n* \u003cstefan.wieland@allaboutapps.at\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallaboutapps%2Fwebviewcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallaboutapps%2Fwebviewcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallaboutapps%2Fwebviewcontroller/lists"}