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

Replit + app updates

Version check and force update for your Replit app

Your Replit web app updates with every publish, but the native shell around it only changes when users install a new store version. When a new feature depends on a newer shell, or old builds point at a URL you are retiring, you need to know who is behind. WebViewGold hands your web app the installed version; a few lines of code turn that into a gentle banner or a hard update screen.

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

When an old app version actually hurts

Web deploys reach every installed version on the next page load. Only changes to the native shell leave users behind, and these are the three that matter:

A web feature needs a newer shell

You switch on in-app purchases, biometric login or a new push provider in version 1.3. Users on 1.2 see the button, but the URL scheme behind it does nothing in their build. Hide or replace the feature for older versions.

The old build loads a URL you are retiring

The start URL is compiled into the app. Moving from a builder subdomain to your own domain, or to a new host, leaves old installs on the old address. Keep it redirecting, and use the version check to move people to the new build.

A breaking change in backend or login

You change auth providers, OAuth redirect domains or link handling, and only the new build has the matching native settings (login helper, Universal Links, URL lists). An update screen is kinder than a login that silently fails.

Prompt for Replit

Paste this into Replit to implement the web-app side. Review the result, publish, then test inside the WebViewGold app.

Prompt to paste into Replit Agent
This app runs inside the WebViewGold native wrapper. Its user agent contains "WebViewGold-iOS" or "WebViewGold-Android", and the global JavaScript variable versionNumber holds the installed app version.
1. Create a Postgres table app_versions (platform, minimum, latest, store_url) with rows for ios and android.
2. Add GET /api/app-version?platform=ios|android&version=X that returns that row with Cache-Control: no-store and logs the platform and the reported version for statistics.
3. In the React client, add checkAppVersion() that runs only inside the app, waits up to 3 seconds for versionNumber, calls the endpoint with a 4 second timeout and compares versions numerically.
4. Below minimum: a full-screen Update required page with a reason, a store button and a support contact. Below latest: a dismissible banner.
5. On timeouts, errors, a missing variable or in a browser, render the app normally.

Great way of converting your web app to a native app! Fast turn-around, and a great way to get your apps into the app stores without the need to develop a full native app!

Kevin Joling · FlightConnections & TrainConnections · Trustpilot

How the WebViewGold version check works

The native side only reports the version; the rule lives in your backend.

  1. Expose the version to your web app

    Set autoInjectVariable to true in Config.swift and AUTO_INJECT_VARIABLES to true in Config.java. WebViewGold then provides versionNumber (the version users see, such as 1.4.0) and bundleNumber (the build number) as JavaScript variables. Without auto-injection, navigate to getappversion:// once and read the same variables.

  2. Publish a version rule from your backend

    Store the minimum supported version and the latest version per platform in your backend: a small table, a JSON file or a remote config entry. Changing the rule then needs no store release, ideally not even a deploy.

  3. Compare numerically, not as text

    As strings, "1.10.0" sorts before "1.9.0". Split on the dots and compare each part as a number, or compare build numbers if you keep them plain increasing integers.

  4. Nudge or block

    Below the latest version: a dismissible banner. Below the minimum: a full-screen "Update required" page with one button to the store listing. In a normal browser, or when the version is unknown, show nothing.

  5. Open the store app, not a store web page

    Link to https://apps.apple.com/app/idYOUR_APPLE_ID and https://play.google.com/store/apps/details?id=your.package.name, and add apps.apple.com and play.google.com to the hosts that always leave the app (safariwhitelist on iOS, BROWSER_WHITELIST on Android), so the system opens the App Store or Play Store instead of a web page inside the WebView.

The version gate in JavaScript

Call it once after the first render in your Replit app. It waits briefly for the injected variable, fails open on every error and only blocks when your backend says so. Use different user-agent tokens per platform, for example "WebViewGold-iOS" in useragent_iphone / useragent_ipad and "WebViewGold-Android" in USER_AGENT:

javascript
const ua = navigator.userAgent;
const inApp = ua.includes("WebViewGold");
const platform = ua.includes("WebViewGold-Android") ? "android" : "ios";

function compareVersions(a, b) {
  const pa = String(a).split(".").map(Number);
  const pb = String(b).split(".").map(Number);
  for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
    const d = (pa[i] || 0) - (pb[i] || 0);
    if (d !== 0) return d < 0 ? -1 : 1;
  }
  return 0;
}

// autoInjectVariable / AUTO_INJECT_VARIABLES = true provides versionNumber;
// otherwise set window.location.href = "getappversion://" once before polling
function waitForVersion(ms = 3000) {
  return new Promise((resolve) => {
    const start = Date.now();
    (function poll() {
      if (typeof versionNumber !== "undefined") return resolve(String(versionNumber));
      if (Date.now() - start > ms) return resolve(null);
      setTimeout(poll, 100);
    })();
  });
}

async function checkAppVersion() {
  if (!inApp) return;                         // browser: nothing to do
  const installed = await waitForVersion();
  if (!installed) return;                     // unknown: fail open
  const rule = await fetch("/api/app-version?platform=" + platform)
    .then((r) => (r.ok ? r.json() : null)).catch(() => null);
  if (!rule) return;                          // backend unreachable: fail open
  if (compareVersions(installed, rule.minimum) < 0) showUpdateRequired(rule.storeUrl);
  else if (compareVersions(installed, rule.latest) < 0) showUpdateBanner(rule.storeUrl);
}

Example rule: minimum 1.3.0, latest 1.4.0

InstalledResultWhat the user sees
1.4.0 or newerUp to dateNothing
1.3.0 to 1.3.xBelow latestA dismissible banner: "A new version is available"
1.2.x or olderBelow minimumA full-screen page explaining why, with one store button and a support contact
Browser, preview or unknown versionNo dataNothing: fail open

Pitfalls that lock users out

  • Raising the minimum too early. Wait until the new build is released in both stores. During a Google Play staged rollout, users outside the rollout percentage cannot get the update yet; Apple's phased release only staggers automatic updates, so iPhone users can update manually right away.
  • Blocking the build under review. App Review installs your newest build, so a correct comparison never blocks it. A buggy one (string comparison, wrong platform detection) shows the reviewer a dead end and earns a Guideline 2.1 rejection.
  • Failing closed. If the variable is missing, the request times out or the phone is offline, let the user in. An update wall that appears by mistake is worse than an old version.
  • Using it for web changes. Web deploys already reach everyone. Only native changes are a reason to update; see what needs a store update.
  • No explanation. One sentence on why the update matters and a support contact beat a bare "Update now", and the screen must not hide behind a login.

Frequently asked questions

Does WebViewGold force updates on its own?

No. WebViewGold tells your web app which version is installed (getappversion:// or the auto-injected versionNumber and bundleNumber variables). The decision and the update screen live in your web app, so you can change the rule at any time without a store release.

Do I need forced updates if my web app updates instantly?

Usually not. Most changes reach every user on the next page load. A version check matters for native changes: new native features, a new start URL or domain, changed link handling or login settings. Many apps only ever need the soft banner.

Do Apple and Google allow an update screen?

Neither store forbids asking users to update, and many large apps do it. Make sure the build under review is never blocked, explain honestly why the update is needed and link only to your own store listing.

Can I use Google Play's in-app update dialog?

Google offers a native in-app update API for Android apps, but it is not part of the documented WebViewGold JavaScript bridge. The version check plus a Play Store link works the same way on both platforms and keeps one code path.

How do I test the update screen?

Temporarily set the minimum version in your backend above your TestFlight or internal-testing build, open the app, check the screen and the store button, then set it back. Also open the site in a normal browser: it must never show the screen there.

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 Replit 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.