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

Cursor + clipboard

Copy and paste in your Cursor app, done right

Copy buttons that silently fail and paste fields that never fill are classic WebView annoyances. In a WebViewGold app, your Cursor app reads the device clipboard on demand with getclipboard:// (the content lands in the clipboarddata variable), and copying uses the standard web Clipboard API with a fallback. Here is the pattern, plus the privacy rules both platforms enforce.

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

Where copy and paste matter in an app

Referral and coupon codes

One tap copies the code, a short "Copied" confirmation appears, and the user pastes it into WhatsApp or Messages. Faster than selecting text with a long press.

One-tap Paste buttons

A Paste button next to an invite code, tracking number or link field reads the clipboard with getclipboard:// and fills the input. Ideal for "save a link" and "join a team" flows.

Exact strings

Wallet addresses, booking references, API keys, Wi-Fi passwords: values nobody should retype. Copy them with a button and show the value next to it.

AI answers and generated text

Chat, writing and prompt tools need a Copy button on every answer; users paste the result into email, notes or social apps.

Prompt for Cursor

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

Prompt for the Cursor agent
Prompt for the Cursor agent: Unify clipboard handling for the WebViewGold app wrapper. 1) Create lib/webviewgold/clipboard.ts exporting copyText(text) (navigator.clipboard.writeText in the user gesture with a hidden-textarea document.execCommand("copy") fallback, returns a boolean) and readClipboard(timeoutMs = 3000) which, when navigator.userAgent includes my custom WebViewGold token, sets window.clipboarddata = undefined, navigates to getclipboard:// and resolves with the trimmed window.clipboarddata or null after the timeout. 2) Replace every direct navigator.clipboard and execCommand call in the codebase with these helpers. 3) Add a useCopy() hook with a 2-second copied state for buttons on API keys, IDs and code snippets. 4) Add Paste buttons only inside the app and validate pasted values. 5) Never write to the clipboard after an await. 6) Add unit tests and a .cursor/rules entry.

WebViewGold has allowed us the shortest and most efficient time-to-market ever possible from among all the other app platforms we have ever tried during the past 5 years. I don’t know why I hadn’t discovered you sooner, but I am really, really glad I did. Currently nearing 6000 app downloads on both iOS App Store & Google Play Store without any problem!

Antonio Davila · CodeCanyon

Make copy and paste reliable inside the app

About 30 minutes.

  1. Copy inside the tap handler

    Call navigator.clipboard.writeText() directly in the click handler, before any slow request: WebViews refuse clipboard writes that happen outside a user gesture. Keep a fallback with a hidden textarea and document.execCommand("copy").

  2. Confirm the copy

    Show a short toast. Android 13 and later display their own copy confirmation, so keep yours small. Inside the app you can add a lighthaptic:// tap, one bridge call at a time.

  3. Paste with getclipboard://

    When the user taps Paste, clear window.clipboarddata, navigate to getclipboard:// (inside the app only, detected by your custom user agent), then poll for the variable for a few seconds and fill the field.

  4. Validate what you pasted

    Trim the value and check that it looks right (an 8-character invite code, a URL on an allowed domain) before you use it. Never auto-submit clipboard content.

  5. Read only on request

    Never read the clipboard on page load, on a timer or in the background. iOS can ask users to allow pasting and Android shows a notice when an app reads the clipboard, so an unrequested read looks like snooping.

Copy and paste helpers

Copy works in the browser and in the app; Paste uses the native bridge inside the app. Wire them to the buttons of your Cursor app:

javascript
var IN_APP = navigator.userAgent.indexOf("WebViewGold") !== -1; // your custom user agent token

// Copy: call directly from the click handler
function copyText(text) {
  if (navigator.clipboard && window.isSecureContext) {
    return navigator.clipboard.writeText(text).catch(function () { legacyCopy(text); });
  }
  legacyCopy(text);
  return Promise.resolve();
}
function legacyCopy(text) {
  var ta = document.createElement("textarea");
  ta.value = text;
  ta.setAttribute("readonly", "");
  ta.style.position = "fixed";
  ta.style.opacity = "0";
  document.body.appendChild(ta);
  ta.select();
  document.execCommand("copy");
  document.body.removeChild(ta);
}

// Paste: read the device clipboard (app only, on a tap)
function pasteInto(input) {
  if (!IN_APP) { input.focus(); return; } // browser: long-press and paste
  window.clipboarddata = undefined;
  window.location.href = "getclipboard://";
  var started = Date.now();
  (function check() {
    if (typeof window.clipboarddata !== "undefined") {
      input.value = String(window.clipboarddata || "").trim();
    } else if (Date.now() - started < 3000) {
      setTimeout(check, 100);
    }
  })();
}

Privacy rules both stores care about

  • A silent clipboard read on launch is exactly the behavior Apple made visible with paste notifications and the paste permission prompt. Read only after a tap on Paste.
  • If you send clipboard content to your server, it is data you collect: cover it in your privacy policy, in App Privacy and in the Data safety form when you store it.
  • Do not copy secrets (passwords, recovery phrases, one-time codes) to the clipboard automatically; other apps may read it later. Offer it as an explicit action with a clear label.
  • Paste buttons improve usability, but reviewers do not count them as a native feature for Guideline 4.2. Pair them with push notifications, biometric login or the share sheet.

Frequently asked questions

Why does my Copy button do nothing inside the app?

navigator.clipboard.writeText only works on https pages and during a user gesture. A call after an awaited request or from a timer is refused, and some WebViews block the API entirely. Copy directly in the tap handler and keep the textarea fallback.

Can the app read the clipboard without the user noticing?

It should not, and the systems make it visible: iOS can ask the user to allow pasting, and Android shows a notice when an app reads the clipboard. Read it only when the user taps a Paste button.

What does getclipboard:// return?

The current clipboard contents, injected into the global JavaScript variable clipboarddata. The value arrives asynchronously, so wait for the variable after the call instead of reading it on the next line.

Does paste work without the bridge?

Yes. Users can always long-press a text field and choose Paste, which needs no code. getclipboard:// adds the one-tap Paste button that fills a field for them.

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