For the complete documentation index, see llms.txt. This page is also available as Markdown.

Introduction

These docs are your reference for the WebToNative JavaScript APIs the native features you call straight from your web pages once your app is built on webtonative.com. Push notifications, biometric login, geolocation, barcode scanning, in-app purchases, device info, and much more are all available through a single JavaScript bridge.

How it works

When your site runs inside a WebToNative app, it gains access to a JavaScript bridge that connects your web code to the device's native capabilities. The idea is simple:

  1. Add the bridge to your site once. You include the WebToNative JavaScript in your pages, either through a script tag or the npm package. The exact link and setup steps are on the Getting Started page.

  2. Call the feature you need. Once the bridge is loaded, every API becomes available either through the global WTN object or as a named import from the package. Each API page shows both styles, plus the values you get back on Android and iOS.

The same pattern works for every API. Reading device info, prompting for Face ID, scanning a barcode, or triggering a push notification all follow the identical load-once, then-call approach so once you've used one API, you've effectively learned them all.

Find the API you need

Each API has its own page with usage examples and platform notes. Browse by area:

Area
APIs

App & UI

Status Bar, Pull to Refresh, Bottom Navigation, Screen Control, Close App, Dynamic App Icon

Device

Device Info, Geo Location, Background Location, Native Contacts, Haptic Feedback, Clipboard

Media & Files

Barcode Scan, Media Player, Download Files, Download Manager, File Sharing, Printing

Notifications

OneSignal, Firebase Notifications, Notification View

Monetization

AdMob, In-App Purchases, RevenueCat, Offer Card

Auth & Security

Biometric Authentication, Social Login, App Tracking Transparency

Analytics

Firebase Analytics, AppsFlyer, Facebook App Events, App Review

New to the bridge? Begin with JS APIs → Getting Started, then pick whichever API you need.

Native Controls & JS Bridge

Beyond the APIs, you can control native UI elements and trigger JavaScript from the native side using the w2n:// URL scheme. See Native Controls & JS Bridge Functions for the full reference..

Setup & Integrations

Plugins that need keys or store-side setup before they work push notifications, in-app purchases, social login, and AdMob are documented in our support section.

Need help?

If something isn't covered here or isn't working as expected, reach out:

Last updated