Webview tabs
Table of Contents
Pugpig Bolt iOS and Android now (as of Bolt 4.1) offer two kinds of webview tab, managed and unmanaged.
These two tab types serve different purposes depending on the kind of experience you want to give your customers and the type of content you want to display.
Both types of tab support the ability to pass the user's auth token to the webview so that they can be seamlessly logged in to an externally-hosted site using the same auth as the app itself.
Managed webview tabs
These are more fully-featured tabs that utilise much of our underlying Bolt product code to provide a consistent experience across webview content and that which is delivered via the Express CMS. For instance, these tabs support all of our bridge functionality which includes, but is not limited to:
- Analytics: events can be passed from the web content to the analytics SDKs included in the app
- Link handling
- Localisation
- User information
These tabs are designed with the expectation that any content in them is hosted on the app domain. Links to other domains will open in an external webview.
Unmanaged webview tabs
Bolt Web
Unmanaged webview tabs are not supported on Bolt Web. Such tabs should be set to only appear on iOS and Android.
Unmanaged webview tabs are a less controlled experience, essentially allowing you to place any page in them and allow that page to dictate behaviour. Most importantly this does not include any link detection or handling, any link tapped on by the user will open within the tab itself. This is good for cases when you have content hosted on an external domain that you want to feel like part of the app.
You'll need to carefully consider navigation for the page used in this tab, there are no back/forwards/refresh buttons as would be expected in a full web browser and thus means it can be easy for users to become stuck or lost. We don't recommend simply placing a full website in one of these tabs, as certain links may not make sense (for example those to the app store listing of the app the user is currently using!)
We will pass the user's auth token to the webview, allowing you to keep a user who is signed into the app also signed into the embedded page. The page itself is then responsible for remembering this status, as the token is only passed when the user first opens the tab, not subsequently for any actions the user might take in the embedded page.
Below in a non-exhaustive list of Bolt functionality that isn't supported in unmanaged webview tabs
- Deeplinks, either to other parts of the app or command deeplinks (e.g Subscribe)
- Content will not be indexed by Pugpig and thus not available in Search
- Our out-of-the-box event tracking. Analytics will need to be handled by the page itself and won't have access to our analytics bridge
- Any links that try to open a new window (_blank), tapping these will do nothing
- Ability to pass the user's dark mode setting to the content
- Any changes to the user's auth state (i.e going to the tab when signed out then signing in)