Issue
I am using the Banno Digital Toolkit and the plugin bridge. In my client's Banno app, I have a card with a primary action button. This button takes the user into a flow and when done with the flow, they click "OK" to return to their digital banking dashboard. This works well with web (mobile and desktop). However, in the native iOS app (probably Android too but haven't tested yet), the button from the plugin card opens an embedded webview. It appears this isn't a plain vanilla, out-of-the-box iOS webview (based on the color scheme and available options), but the docs do state this uses a SFSafariViewController. What I need to know is: Can I reliably detect if the user is in the embedded webview vs. the mobile Safari browser app? My intention is to use that information to inform the user to close the embedded webview after the flow is complete. As it currently stands, the code for the "OK" button directs a user back to the banking dashboard, so on native mobile, the user will see the dashboard in the webview when the webview should just be closed.
Solution
This ends up being platform specific (e.g. Android differs from iOS) but essentially boils down to sniffing the user agent headers in your server.
Some internet resources that might be helpful:
- Detect if user is using webview for android/iOS or a regular browser
- detect ipad/iphone webview via javascript
- https://developer.chrome.com/docs/multidevice/user-agent/#webview_user_agent
Answered By - Jaime Lopez Jr.
Answer Checked By - Katrina (JavaFixing Volunteer)