Package for working with WKWebView
and for communicating between JS and Swift.
- Implement protocol
WebKitBridgeOutcomeEvent
with functiongetScript()
. Just return JS code in it as proper String. - Inside
WebKitBridgeViewController
call methodrun(outcomeEvent:)
and pass your protocol implementation
- Implement protocol
WebKitBridgeIncomeEvent
. - When initalize
WebKitBridgeViewController
pass realWebKitBridgeIncomeEventsManager
with events (for exampleWebKitBridgeBaseIncomeEventsManager
). - React on method
fire
in protocolWebKitBridgeIncomeEvent
implementation.
designConfiguration
- config for designlinkURL
- url to openspinnerManagerType
- type of entity, that will be initialized to display/hide spinnerincomeEventsManager
- entity for creating and managing income eventsviewsProvider
- entity for creating loading/reachability/error viewsreachabilityService
- entity for providing info about reachability
Controller, that containt WKWebview
.
domContentLoaded
- called when dom contend loaded (likeviewDidAppear
)
Manager for reloading all webviews.