This package provides extensions to commonly used WebKit
Classes, like WKWebView
and WKUserContentController
.
Everything is written in Swift, documented and tested.
- Add a specified JavaScript file as user script to a WKWebView.
- Execute specified java script file.
- Stringify an instance of a HTTPCookie into a string of key/value pairs.
- Set/replace cookies asynchronously.
- Remove mutiple cookies at once.
- Get all cookies of all domains or from a specific one.
Just integrate the APLWebKitExtension via Xcode 11 (tutorial).
After importing APLWebKitExtension
all extensions and documentation can be accessed the default way.
An example of using the method executeJavaScriptFile()
of the WKWebView
extension:
import APLWebKitExtension
let wkWebView = WKWebView(frame: .zero)
wkWebView.executeJavaScriptFile("jsFile", fileExtension: "js", completion: nil)
APLWebKitExtension is created by apploft on 02.04.2020. Copyright © 2019 apploft GmbH MIT License · http://choosealicense.com/licenses/mit/