How to install and import the Nativine Native Bridge client-side SDK.
The Nativine JavaScript SDK provides a helper namespace to communicate with the native Android/iOS wrapper layer. You can integrate it into your site using several straightforward options:
Add the following script block to the <head> of your website index HTML. This exposes the global window.Nativine object on startup:
<script src="https://nativine.com/nativine.js" defer></script>
If you prefer hosting the SDK locally in your static assets folder, download the SDK file directly from:
https://nativine.com/nativine.js
For Next.js, React, or Vue setups, download the file and import it dynamically on client mount:
useEffect(() => {
import('./nativine.js').then(() => {
if (window.Nativine?.isApp) {
console.log("Running inside Nativine wrapper app!");
}
});
}, []);