RORK LABJP
RORK MAX — Rork Max can now build native Swift apps for iPhone, iPad, Apple Watch, Apple TV, and Vision ProPUBLISH — Rork Max offers two-click App Store publishing with no Xcode required, cutting the friction of getting an app shippedEXPO — The standard Rork is built on React Native (Expo), generating native iOS and Android apps from plain-English descriptionsPRICING — Rork is free to start, with paid plans beginning at $25/month, an accessible tier for solo developersFUNDING — Rork raised $2.8M from a16z (Andreessen Horowitz) as investment keeps flowing into AI app buildersREVIEW — In real use the keys are generated-code readability and maintainability, Expo-related constraints, and how easily billing, push, and ad SDKs slot inRORK MAX — Rork Max can now build native Swift apps for iPhone, iPad, Apple Watch, Apple TV, and Vision ProPUBLISH — Rork Max offers two-click App Store publishing with no Xcode required, cutting the friction of getting an app shippedEXPO — The standard Rork is built on React Native (Expo), generating native iOS and Android apps from plain-English descriptionsPRICING — Rork is free to start, with paid plans beginning at $25/month, an accessible tier for solo developersFUNDING — Rork raised $2.8M from a16z (Andreessen Horowitz) as investment keeps flowing into AI app buildersREVIEW — In real use the keys are generated-code readability and maintainability, Expo-related constraints, and how easily billing, push, and ad SDKs slot in
Articles/App Dev
App Dev/2026-06-15Intermediate

Adding NFC Tag Reading to a Rork Max App with Core NFC

How to add Core NFC to a Swift app generated by Rork Max and read NDEF tags, covering the entitlement and Info.plist setup through the production gotchas, with real code.

Rork Max155Core NFCNFCNDEFSwift15

Premium Article

While building a stamp-card app, someone asked me to record store visits by tapping a physical tag instead of a QR code. Launching the camera and lining up a code is surprisingly fiddly in the few seconds you have at a counter. With an NFC tag, a tap is all it takes.

Rork Max generates the Swift app, but a feature like Core NFC that involves an Apple entitlement will not run from the generated code alone. Unless you fix up the signing and the plist by hand, the build succeeds yet the session closes instantly on a device. Here is the order I used as an indie developer, including where I tripped.

Set the Entitlement and Info.plist First

Configuration comes before code. Miss this and no amount of correct code will run. Three things are required.

  1. Enable the Near Field Communication Tag Reading capability on your App ID in the Apple Developer portal.
  2. Add an .entitlements file and put NDEF into com.apple.developer.nfc.readersession.formats.
  3. Add NFCReaderUsageDescription to Info.plist and explain why you use NFC.

Reviewers read that third string. "Reads tags" is vague and invites a rejection. I write something that shows the use case, like "Reads the NFC tag at the register to record visit points."

<!-- App.entitlements -->
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
    <string>NDEF</string>
</array>

Write the NDEF Reading Session

With configuration done, build the reader. Make a small reader class that owns an NFCNDEFReaderSession and can be called from the screen Rork Max generated.

import CoreNFC
 
final class TagReader: NSObject, ObservableObject, NFCNDEFReaderSessionDelegate {
    @Published var lastPayload: String?
    private var session: NFCNDEFReaderSession?
 
    func begin() {
        guard NFCNDEFReaderSession.readingAvailable else {
            print("NFC not available on this device")
            return
        }
        session = NFCNDEFReaderSession(
            delegate: self,
            queue: nil,
            invalidateAfterFirstRead: true
        )
        session?.alertMessage = "Hold the top of your iPhone near the tag"
        session?.begin()
    }
 
    func readerSession(_ session: NFCNDEFReaderSession,
                       didDetectNDEFs messages: [NFCNDEFMessage]) {
        guard let record = messages.first?.records.first else { return }
        let text = decodeText(from: record) ?? "(empty)"
        DispatchQueue.main.async { self.lastPayload = text }
    }
 
    func readerSession(_ session: NFCNDEFReaderSession,
                       didInvalidateWithError error: Error) {
        // User cancel and read failures also land here
        print("session invalidated: \(error.localizedDescription)")
    }
}

With invalidateAfterFirstRead: true the session closes after one tag. To read several in a row, set it to false and call invalidate() yourself. For one-at-a-time cases like a stamp card, true is the straightforward choice.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
A checklist for the three required entitlement and Info.plist settings so none are missed
Complete working code for reading with NFCNDEFReaderSession and its delegate
Fixes for read failures, iPhone antenna placement, and background reading in production
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

App Dev2026-06-14
Designing WidgetKit Timelines Around the Refresh Budget: Why My Wallpaper Widgets Stopped
Why does a home screen widget stop updating after the evening? A clear look at WidgetKit timeline design through three lenses: the refresh budget, the reload policy, and entry density. With a working TimelineProvider, an entry design that does not burn through the budget, and relevance-based prioritization, drawn from running six wallpaper apps solo.
App Dev2026-05-30
Killing Thumbnail Scroll Jank in an iOS Wallpaper App — Notes on ImageIO Downsampling
Lay out a lot of thumbnails and scrolling stutters while memory balloons. The culprit was full-size image decoding on the main thread. Here is how ImageIO downsampling and prefetching cut measured memory dramatically.
App Dev2026-04-03
Beta Testing Your Rork App with TestFlight: from Internal Testers to Public Launch
A complete walkthrough for distributing your Rork or Rork Max app through TestFlight. Covers App Store Connect setup, provisioning profiles, internal and external tester management, feedback collection, and a pre-launch checklist.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →