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

Cursor + NFC

NFC tag reading and writing for your Cursor app

Safari gives websites no NFC access at all, and Web NFC only exists in Chrome on Android. Wrapped with WebViewGold, your Cursor app starts a native NFC scan with one link and receives the tag content in a JavaScript function: on Android through the documented NFC API, on iPhone through the WebViewGold NFC plugin. Check-ins, equipment tags and tap-to-save contact cards become a few lines of code.

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

What NFC tags can do for your users

Tap-to-check-in

A tag at the entrance, desk or classroom stores a token. The user holds the phone to it, readnfc:// hands the token to your web app, and your backend records the visit for the logged-in user. Works in a dark venue and without pointing a camera at anything.

Asset and equipment tags

Stick a tag on a machine, a rental bike or a storage box and program its ID once with writenfc://?value=…. Staff tap it later to open the right record: maintenance log, rental status, stock count.

Tap-to-save contact cards

Write a vCard to a card or sticker (prefix VCARD_, properties separated by underscores) and other phones can save the contact with a tap. Useful for event, networking and real-estate apps.

Smart posters without a scan button

A tag that holds a plain https link to your domain (programmed with any NFC writer) is read by the phone itself on recent iPhones and most Android phones. With Universal Links and App Links set up, that link opens the app directly.

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: Read https://www.webviewgold.com/docs/android/nfc/ and https://www.webviewgold.com/docs/iOS/nfc/, then implement NFC tag reading for the WebViewGold wrapper. 1) Create lib/webviewgold/nfc.ts exporting isWebViewGold() (navigator.userAgent includes my custom WebViewGold token), readTag(timeoutMs = 30000) which installs window.readNFCResult = (data, id, tag) => resolve({ data, id, tag }), navigates to readnfc:// and rejects on timeout, and writeTag(value) which navigates to writenfc://?value= with spaces encoded as %20. 2) Never fire two bridge navigations in the same tick. 3) Add a TapToCheckIn component that awaits readTag() and posts data to our existing check-in API with the current session. 4) Server side, validate the token, deduplicate within 10 minutes and log the check-in. 5) Outside the app, render a manual code input instead of the button. 6) Add unit tests with a mocked window and document the bridge in .cursor/rules.

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

From blank tag to working feature

An afternoon, most of it testing with real tags.

  1. Choose tags that both platforms read

    NTAG213, NTAG215 or NTAG216 stickers and cards work with iPhones and Android phones and hold 144 to 888 bytes: enough for a token or a short URL, not for files. Order a few spares for testing.

  2. Enable NFC in the native app

    Android: the read and write API is described in the Android documentation. iOS: NFC is a WebViewGold plugin outside the general feature scope; request it (free consultation, non-binding quote) and enter the token you receive in NFCEnabled in Config.swift. Apple also requires the NFC tag reading capability and a purpose string that names your use case.

  3. Add a scan button

    When the user taps "Hold your phone to the tag", navigate to readnfc://, but only inside the app (check the custom user agent you set in WebViewGold). On iPhone, iOS shows its own scan sheet while the session listens.

  4. Handle the result

    Define a global readNFCResult function. iOS calls it with (data, id, tag): content, tag identifier and tag type. Android calls it with (data). Build your logic on data so it behaves the same on both.

  5. Validate on the server

    Send the value to your backend together with the user session and decide there whether a check-in counts. Tags can be copied, so rotate tokens or add time windows for anything valuable.

  6. Program tags from an admin screen

    Navigate to writenfc://?value=…: the app enters write mode and stores the value on the next tag held to the phone. Keep values short and URL-safe (letters, digits, hyphens) and encode spaces as %20.

A cross-platform NFC helper

Drop this into your Cursor app or ask the agent to write the equivalent in your framework. /api/checkin stands for your own check-in route; in your Cursor project that is: Your own API routes or services. The user agent token is the one you configure in WebViewGold.

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

function scanTag() {
  if (!IN_APP) { showMessage("Tap-to-check-in works in our mobile app. Enter the code instead."); return; }
  window.location.href = "readnfc://";
}

// Called by WebViewGold after a tag was read.
// iOS passes (data, id, tag), Android passes (data).
window.readNFCResult = function (data, id, tag) {
  fetch("/api/checkin", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ token: data, tagId: id || null })
  })
    .then(function (r) { return r.json(); })
    .then(function (res) { showMessage(res.ok ? "Checked in" : "This tag is not known"); });
};

// Admin: write a token (or a VCARD_ string) to the next tag
function writeTag(value) {
  if (!IN_APP) { return; }
  window.location.href = "writenfc://?value=" + value.replace(/ /g, "%20");
}
// writeTag("VCARD_FN:Jane Doe_TEL;TYPE=CELL:5551234567");

Store review and device limits

  • Not every device has NFC: iPads have none, iPhones read tags from the iPhone 7 on, and many budget Android phones lack it or have it switched off. Always offer a fallback such as a QR code or a typed code that runs the same flow.
  • Reviewers rarely own your tag. Explain the NFC flow in the App Review notes, give them a demo code or QR code that triggers the same result, and consider linking a short screen recording of a real tap.
  • A vague purpose string ("uses NFC") invites a Guideline 5.1.1 rejection on iOS. Name the benefit: "to check in at partner studios by holding your phone to the tag at the door".
  • If AndroidManifest.xml declares NFC as a required hardware feature, Google Play hides the app from phones without NFC. Mark it as not required unless the app is useless without it.
  • Tie every check-in to the signed-in user, never to the device alone. Tag IDs and check-in history are data you collect: list them in your privacy policy, in App Privacy and in the Data safety form.

Frequently asked questions

Does NFC work on iPhone inside a web app?

Not in Safari: iOS gives websites no NFC access. Inside a WebViewGold app it works through the native NFC plugin on iPhone 7 and newer. The user starts every scan, and iOS shows its own scan sheet while it listens.

Is NFC included in the WebViewGold license?

On Android the read and write API is part of the documentation. On iOS, NFC is a plugin outside the general feature scope: the WebViewGold team enables it per app with a token after a free consultation and a non-binding quote. Extended needs such as special tag types are custom work on both platforms.

Should I use NFC or a QR code?

QR codes cost nothing, work on every phone with a camera and are easy for reviewers to test. NFC is faster, works in the dark and feels premium, but needs tags and NFC hardware. Many apps offer both: NFC as the quick path, a QR code or typed code as the fallback.

Can I read the tag serial number?

On iOS the callback also receives the tag identifier and the tag type. The Android callback documented today returns the stored data only, so for logic that must work on both platforms, write your own ID or token to the tag.

How will the App Store reviewer test NFC?

Usually they cannot, because they do not have your tag. Describe the feature in the review notes, provide a demo code or QR code that runs the same flow, and link a short screen recording of a real tap.

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.