
9/29/2017
What this post added
This post introduces a hybrid architecture for the Shopify Mobile app, integrating native iOS/Android components with web views. It details the implementation of a JavaScript bridge to enable communication between web views (rendering embedded third-party apps) and native mobile code. This bridge intercepts calls to the Embedded App SDK (EASDK), allowing native UI elements like navigation bars and buttons to be rendered, optimizing screen real estate and providing a consistent user experience. The post outlines the technical implementation on both iOS (WKWebView, postMessage, WKUserScript, WKScriptMessageHandler) and Android (Java Object injection, WebView), as well as the middleware system for message augmentation and suppression. It also describes how native interactions are communicated back to the web via HTML postMessages.