{"id":20564103,"url":"https://github.com/clintjang/jwswebviewsample","last_synced_at":"2025-07-11T00:06:07.457Z","repository":{"id":99120025,"uuid":"114352405","full_name":"ClintJang/JWSWebViewSample","owner":"ClintJang","description":"JWSWebViewSample created sample code for UIWebView and WKWebView with swift and objective-c.","archived":false,"fork":false,"pushed_at":"2018-04-30T09:22:46.000Z","size":4599,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T15:10:06.144Z","etag":null,"topics":["appdelegate","swift","swift-source","uiwebview","wkwebview"],"latest_commit_sha":null,"homepage":null,"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/ClintJang.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":"2017-12-15T09:26:45.000Z","updated_at":"2020-04-11T06:05:17.000Z","dependencies_parsed_at":"2023-03-11T11:46:20.556Z","dependency_job_id":null,"html_url":"https://github.com/ClintJang/JWSWebViewSample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClintJang%2FJWSWebViewSample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClintJang%2FJWSWebViewSample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClintJang%2FJWSWebViewSample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClintJang%2FJWSWebViewSample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClintJang","download_url":"https://codeload.github.com/ClintJang/JWSWebViewSample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248904640,"owners_count":21180835,"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":["appdelegate","swift","swift-source","uiwebview","wkwebview"],"created_at":"2024-11-16T04:23:55.923Z","updated_at":"2025-04-14T15:10:13.815Z","avatar_url":"https://github.com/ClintJang.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JWSWebViewSample\n[![License](http://img.shields.io/badge/License-MIT-green.svg?style=flat)](https://github.com/clintjang/JWSBoltsSwiftSample/blob/master/LICENSE) [![Swift 4](https://img.shields.io/badge/swift-4.0-orange.svg?style=flat)](https://swift.org) [![objective-c](https://img.shields.io/badge/objective_c-1.0-orange.svg?style=flat)](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html)\n\n- Link 1-En (Good): [WKWebView: Differences from UIWebView browsing engine](http://docs.kioskproapp.com/article/840-wkwebview-supported-features-known-issues#requires-ios9)\n- Link 1-Ko (Good): [UIWebView와 WKWebView의 차이](http://zeddios.tistory.com/332)\n- Link 2: [What's the difference between UIWebView and WKWebView?](https://www.hackingwithswift.com/example-code/wkwebview/whats-the-difference-between-uiwebview-and-wkwebview)\n\n\n## Requirements\n- Minimum iOS Target : iOS 9.0\n- Minimum Xcode Version : Xcode 9.0\n- This Sample Project : Xcode 9.2\n(Because of \"Self Area\")\n\n## Description\n- This is the WebView Sample source. Both UIWebView and WKWebView can be checked together.You can also check the Swift source and Objective-C source.\n\n- This is the default project swift. You can also test with objective-c by adding an objective-c source inside. Public data was managed by appdelegate.swift.\n\n- It is easy to check the execution result of UIWebView and WKWebView.\n\n- An example of using objective-c in swift, and an example of using the swift source in objective-c.\n\n\n# Info\n## Result Image\n\n\u003ctable style=\"width:100%\"\u003e\n  \u003ctr\u003e\n\t\u003cth\u003estructure\u003c/th\u003e \n    \u003cth\u003eobjective-c\u003c/th\u003e\n    \u003cth\u003eswift\u003c/th\u003e \n  \u003c/tr\u003e\n  \u003ctr\u003e\n  \t\u003ctd\u003e\u003cimg width=\"268\" height=\"480\" src=\"/Image/structure_00.png\"\u003e\u003c/img\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg width=\"268\" height=\"480\" src=\"/Image/objectivec_gif_00.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg width=\"268\" height=\"480\" src=\"/Image/swift_gif_00.gif\"\u003e\u003c/img\u003e\u003c/td\u003e \n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\n## Source\n- AppDelegate.swift\n\n```swift\n... \n    // Change your test URL here.\n    private let urlString = \"http://www.github.com\"\n\n    // For convenience, I created it in \"appdelegate\". This is whether or not \"URL\" is selected.\n    @objc var isURL:Bool = false\n    \n    @objc var url:URL? {\n        return URL(string: urlString)\n    }\n...\n```\n\n- swift \n\t- WKWebView : SwiftWKWebViewController.swift\n\t- UIWebView : SwiftUIWebViewController.swift\n- objective-c\n\t- WKWebView : ObjectiveCWKWebViewViewController.h , .m\n\t- UIWebView : ObjectiveCUIWebViewViewController.h , .m\n\n- sample.html\n\u003cimg width=\"634\" height=\"237\" src=\"/Image/sample_html_00.png\"\u003e \n\n## Apple Link\n- WKWebView : https://developer.apple.com/documentation/webkit/wkwebview\n- UIWebView : https://developer.apple.com/documentation/uikit/uiwebview\n\n## Using Swift And Objective-C together\n- Swift\n\u003ctable style=\"width:100%\"\u003e\n  \u003ctr\u003e\n\t\u003cth\u003ePackaging, Defines Module : YES\u003c/th\u003e \n    \u003cth\u003eImport \"yourprojectname-Swift.h\"\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n  \t\u003ctd\u003e\u003cimg width=\"440\" height=\"120\" src=\"/Image/use_swift_00.png\"\u003e\u003c/img\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg width=\"357\" height=\"60\" src=\"/Image/use_swift_01.png\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n- Objective-C, Bridging Header Setting\n\n\u003cimg width=\"453\" height=\"118\" src=\"/Image/use_objectivec.png\"\u003e\u003c/img\u003e\n\n## Safe Area\n- Also available on iPhone X\n- https://developer.apple.com/documentation/uikit/uiview/positioning_content_relative_to_the_safe_area\n\n\u003ctable style=\"width:100%\"\u003e\n  \u003ctr\u003e\n\t\u003cth\u003eiPhone X Sample View 1\u003c/th\u003e \n    \u003cth\u003eiPhone X Sample View 2\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n  \t\u003ctd\u003e\u003cimg width=\"317\" height=\"665\" src=\"/Image/iPhoneX_safe_area_01.png\"\u003e\u003c/img\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg width=\"317\" height=\"665\" src=\"/Image/iPhoneX_safe_area_00.png\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclintjang%2Fjwswebviewsample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclintjang%2Fjwswebviewsample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclintjang%2Fjwswebviewsample/lists"}