451 B
451 B
iOS WKWebView Lifecycle
- Create
WKWebViewConfigurationandWKUserContentController. - Add user scripts for context injection and bridge handlers.
- Register message handlers before navigation.
- Push/present webview controller with campaign URL.
- Process callbacks in
userContentController:didReceiveScriptMessage:. - Route navigation and external links in WKNavigation delegate callbacks.
- Remove message handlers during teardown.