Skip to content
WebViewGold Vibe Coding to App Store
English
Get WebViewGold

Claude Code

Adding native features with Claude Code and the WebViewGold JavaScript bridge

WebViewGold exposes native capabilities to your web app as URL schemes and a few global JavaScript variables. That makes them ideal work for an agent: point Claude Code at the documentation, tell it which features you enabled, and it wires them into your existing components. Here is how to do that without invented API names.

From $109 one-time per platform, or let our team do it all from $698.

  • Approval guarantee – or money back within 14 days
  • No coding needed
  • One-time payment, free updates
  • 24/7 human support
  • Made in Germany since 2014 · ISO 27001

How the bridge works

Your web app asks the wrapper to do something by navigating to a scheme, for example window.location.href = "bioauth://". The wrapper intercepts the navigation, performs the native action and reports back either by calling a global function you defined (onBioAuthSuccess()), by injecting a global variable (onesignalplayerid, nativePushEnabled, barcodescanresult) or by loading a URL (the QR scanner opens the scanned URL in the app). There is no SDK to install and nothing to bundle.

Everything is documented in one machine-readable file: webviewgold.com/llms-full.txt. Tell Claude Code to read the relevant section before it writes code, and it will use the exact scheme names instead of plausible-sounding ones. Every scheme in this article was checked against that file.

The integration prompt

Adjust the feature list to what you switched on in Config.swift and Config.java.

Paste into Claude Code
Our web app also runs inside native iOS and Android apps built with WebViewGold. Native features are triggered by navigating to URL schemes and results come back as global JavaScript variables or global callback functions. Before writing any code, fetch https://www.webviewgold.com/llms-full.txt and read the sections for: Push Notifications API, Biometric Authentication API, QR Code Scanner API, App Sharing Dialog API, Haptic Feedback API, File Downloader API, HTML5 Geolocation API. Use only scheme names that appear in that file.

Then implement, in src/lib/native.ts: isNativeApp() (user agent contains the token WebViewGoldApp), callNative(scheme) (sets window.location.href only when isNativeApp() is true, otherwise returns false), and a readInjected(name, timeoutMs) helper that polls for a global variable the wrapper injects.

Wire these features into the existing UI, each behind isNativeApp() with a web fallback:
1. Push: an Enable notifications button that calls registerpush://, a settings row that calls checkNativePushPermissions:// and reads nativePushEnabled, and after login a call to getonesignalplayerid:// that reads onesignalplayerid and saves it to the user profile via our API.
2. Biometrics: a Face ID / fingerprint lock for the /wallet route using bioauth:// and the three callbacks onBioAuthSuccess, onBioAuthFailure(errorCode, errorMessage), onBioAuthUnavailable; on unavailable, fall back to the password re-entry we already have.
3. QR check-in: a Scan button that calls qrcode://; our QR codes contain URLs on our own domain, so handle the /checkin route they open.
4. Share: replace the copy-link button with shareapp://message?=TEXT&url=URL when native, with encodeURIComponent on both values.
5. Haptics: successhaptic:// after a completed order, errorhaptic:// on form validation errors, lighthaptic:// on tab changes. On iOS, use the iframe technique from the documentation so haptics do not interrupt navigation.
6. Downloads: image downloads use savethisimage://?url=IMAGE_URL; PDF links stay normal links.
7. Geolocation: keep navigator.geolocation but show a pre-permission explanation screen the first time.
Report which Config.swift / Config.java options and Info.plist or AndroidManifest entries I must enable for each feature.

The helper the agent should build on

Small, framework-agnostic, and the only place that knows about the user agent.

javascript
// src/lib/native.ts
export function isNativeApp() {
  return typeof navigator !== "undefined" && navigator.userAgent.indexOf("WebViewGoldApp") !== -1;
}

export function callNative(scheme) {
  if (!isNativeApp()) return false;
  window.location.href = scheme;
  return true;
}

// Wait for a variable the wrapper injects, e.g. onesignalplayerid or nativePushEnabled
export function readInjected(name, timeoutMs) {
  return new Promise(function (resolve, reject) {
    var started = Date.now();
    (function check() {
      if (typeof window[name] !== "undefined") return resolve(window[name]);
      if (Date.now() - started > (timeoutMs || 3000)) return reject(new Error(name + " not injected"));
      setTimeout(check, 100);
    })();
  });
}

I am very happy I bought this app! Extremely easy and great documentation. Was in contact with the customer service, they replied very quickly and very friendly. They solved my question within a day. 10/10 would recommend.

Nelis Geiger · CodeCanyon

Push: permission, status and the user ID

Requires a push service switched on in the wrapper (OneSignal via kPushEnabled and oneSignalID in Config.swift, PUSH_ENABLED plus the IDs in build.gradle on Android). Set askforpushpermissionatfirstrun (iOS) and requirePush (Android) to false so the prompt is yours to time.

javascript
import { callNative, readInjected } from "./native";

// 1. Ask at the right moment (after onboarding, not on first launch)
export function askForPush() {
  return callNative("registerpush://");
}

// 2. Is push currently allowed? Sets window.nativePushEnabled
export async function isPushEnabled() {
  if (!callNative("checkNativePushPermissions://")) return null;
  return readInjected("nativePushEnabled", 2000);
}

// 3. Store the OneSignal subscription ID on the user so the server can target this device
export async function syncPushId(saveToProfile) {
  if (!callNative("getonesignalplayerid://")) return;
  var id = await readInjected("onesignalplayerid", 3000);
  await saveToProfile(id);
}

// 4. A local reminder in two hours, no push service needed
export function scheduleLocalReminder(title, message, url) {
  var seconds = 2 * 60 * 60;
  callNative("sendlocalpushmsg://push.send?s=" + seconds + "=msg!" + message + "&!#" + title + "&!#" + url);
}

Biometrics: bioauth:// and its three callbacks

On iOS the project needs the Face ID usage description in Info.plist (NSFaceIDUsageDescription); Android uses the system BiometricPrompt and needs nothing extra. The wrapper calls the global functions, so define them on window.

javascript
import { callNative } from "./native";

export function requireBiometrics(onPass, onFallback) {
  window.onBioAuthSuccess = function () { onPass(); };
  window.onBioAuthFailure = function (errorCode, errorMessage) {
    console.warn("bioauth failed", errorCode, errorMessage);
    onFallback();
  };
  window.onBioAuthUnavailable = function () { onFallback(); };
  if (!callNative("bioauth://")) onFallback(); // browser: use the password re-entry instead
}

// Security note from the documentation: treat the success callback as a UI gate only.
// Keep sensitive actions behind a server-side session check as well.

The remaining features in one line each

QR code scanner

qrcode:// opens the native scanner and loads the scanned URL in the app, so encode URLs on your own domain. For product barcodes use barcodescanner:// and read barcodescanresult.

Share sheet

shareapp://message?=TEXT&url=URL opens the system share dialog on both platforms. Encode both values. On Android, the ShareIntent API additionally lets other apps share into yours.

Haptics

lighthaptic://, heavyhaptic://, successhaptic://, warninghaptic://, errorhaptic://; mediumhaptic:// is iOS only. The docs show an iframe helper so the call does not cancel a navigation that is in flight.

Downloads

savethisimage://?url=… saves an image to the photo library. Links ending in .pdf, .docx, .xlsx, .mp3 and other listed extensions download natively; extend the list with extentionARY (Config.swift) or downloadableExtension (Config.java), or enable autodownloader / AUTO_DOWNLOAD_FILES for Content-Disposition headers.

Geolocation

Plain navigator.geolocation works; the wrapper shows the native permission dialog. iOS needs HTTPS and the location usage description text in Info.plist, Android needs requireLocation set to true in Config.java with the manifest entries in place.

Which wrapper switch belongs to which feature

FeatureiOS (Config.swift / project)Android (Config.java / project)
Push (OneSignal)kPushEnabled, oneSignalID; docsPUSH_ENABLED, IDs in build.gradle; docs
BiometricsFace ID usage description in Info.plist; docsNo setting needed; docs
QR / barcodeCamera usage description; qrcodelinks decides where scanned URLs open; docsrequireCamera, QR_CODE_URL_OPTIONS; docs
Share, hapticsNothing to enable; docsNothing to enable; docs
DownloadsextentionARY, autodownloader; docsdownloadableExtension, AUTO_DOWNLOAD_FILES, requireStorage; docs
GeolocationLocation usage description in Info.plist; docsrequireLocation; docs

Frequently asked questions

Does Claude Code need internet access to read llms-full.txt?

It needs to fetch the file once. If your setup blocks web access, download the file into the repository (for example docs/webviewgold-llms-full.txt) and reference that path in CLAUDE.md.

Why store the OneSignal subscription ID on the user?

Because the server can then send a push to one specific person (order shipped, new reply). Without the ID you can only broadcast to segments.

Can the agent also enable the features in the WebViewGold projects?

Yes, for Config.swift and Config.java values and permission strings. Keep signing and provisioning out of its hands; the project configuration guide explains the boundaries.

What happens if I call a scheme for a feature that is switched off?

Nothing visible. registerpush:// without an active push service, for example, has no effect. Enable the feature in the wrapper first, then test the call.

Three ways to get your app into the stores

Same result, different amount of work on your side. All three come with the approval guarantee and 24/7 human support.

Do it yourself

$109 per platform, one-time

The WebViewGold license: a finished Xcode or Android Studio project. Paste your URL, set name and icon, switch on features, build and submit. Free updates forever.

See plans on the main page

Cloud Builder

$349 per license, one-time add-on

No Mac, no Xcode, no Android Studio: configure in the browser, we build both apps in the cloud and hand them to App Store Connect and the Play Console.

How the Cloud Builder works Try the free demo

Full Service

$698 per platform $798

Send us your URL and icon. Our team configures, builds and delivers your app within 72 hours, white-label, with source projects. Both platforms for $1,158.

Full Service details Powered by WeSetupYourWebViewApp

Winter Sale prices valid until December 31, 2026.

Ready to ship your app?

App Store & Google Play approval guarantee – or your money back within 14 days

Rather hand it over? Full Service: we configure, build and deliver within 72 hours, from $698 per platform. Questions? Chat with us 24/7.

Refunds are granted under the conditions listed in our FAQ: a non-content rejection by Apple and/or Google, claimed within 14 days after purchase.