- WebSDK uses browser storage, which is not enabled by default for WebView Applications.
- For Mobile Apps, we must explicitly enable browser storage by providing javascript permission.
Steps to Enable WebSDK in WebView
To run WebSDK in WebView,- Ensure you have correctly integrated Web SDK into your website.
- Ensure you provide permission to use JavaScript for your Android/iOS app.
For Android Apps
Step 1: Configure Your WebView Within your app, locate theWebView component for which you wish to enable JavaScript. Ensure you have the proper imports:
WebSettings class, enable JavaScript:
It is important to consider the security implications of enabling JavaScript. Always validate the URL you load in
WebView.For iOS Apps
Step 1: Import WebKit First, ensure you’ve imported theWebKit framework in your ViewController:
WKWebView and add it to your view:
WKWebView, but you can verify or change the settings through the WKPreferences object:
Supported Modules
In WebView, we support the following modules:- Data Tracking
- On-site Messaging
- Card’s
- Web Personalization