Daily iOS
App lifecycle and system

Native bridge for WKWebView

Most of the service is built in WKWebView, and you have to maintain the bridge the web side uses to call native features like biometrics and the camera. Which APIs do you build the bridge with?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

JS to native goes through WKScriptMessageHandler (or WithReply), native to JS goes through evaluateJavaScript or callAsyncJavaScript, and the {id, method, params} protocol carries a version field.

Share a question