RORK LABJP
FREETRY — Rork announced on X that Rork Max is free to try for a limited time, a chance to touch the $200/month tier without paying up frontONESHOT — Rork Max claims to one-shot almost any app for iPhone, Watch, iPad, TV, and Vision Pro, including builds that lean on AR and 3DXCODE — Positioned as a website that replaces Xcode: one click to install on device, two clicks to publish to the App Store, powered by Swift, Claude Code, and OpusPAPERLINE — Rork acquired the app builder Paperline and says it will stay acquisitive to bring in engineering talentSKILLS — Rork's app-store-connect-cli-skills repo was updated on July 9, a sign the submission tooling keeps getting attentionMARKET — Gartner expects 75% of new applications to be built with low-code or no-code tools by the end of 2026, up from under 25% in 2020FREETRY — Rork announced on X that Rork Max is free to try for a limited time, a chance to touch the $200/month tier without paying up frontONESHOT — Rork Max claims to one-shot almost any app for iPhone, Watch, iPad, TV, and Vision Pro, including builds that lean on AR and 3DXCODE — Positioned as a website that replaces Xcode: one click to install on device, two clicks to publish to the App Store, powered by Swift, Claude Code, and OpusPAPERLINE — Rork acquired the app builder Paperline and says it will stay acquisitive to bring in engineering talentSKILLS — Rork's app-store-connect-cli-skills repo was updated on July 9, a sign the submission tooling keeps getting attentionMARKET — Gartner expects 75% of new applications to be built with low-code or no-code tools by the end of 2026, up from under 25% in 2020
Articles/Dev Tools
Dev Tools/2026-07-18Advanced

Your AR Furniture Is Gone by Morning — Persisting Placements with ARWorldMap

AR apps generated by Rork Max lose every placed object on relaunch. Here is the design that fixes it: when to save an ARWorldMap, how to encode custom anchors, how to handle the relocalization wait, and what to do when relocalization simply never lands.

Rork Max229ARKit2ARWorldMapSwift48indie development31

Premium Article

Ask Rork Max for an AR app that places furniture on the floor, and it hands you something that works on the first run. Session setup, plane detection, tap-to-place — all of it, without writing a line of Swift yourself.

The trouble showed up the next morning.

I closed the app after placing a few pieces, reopened it the following day, and every single object was gone. Not a bug. An ARKit session remembers nothing unless you tell it to. After years of shipping wallpaper apps as an indie developer, I thought I had a decent nose for missing persistence — but AR moved the goalposts. Saving coordinates is not enough.

What follows is the design that fills that gap.

Why saving coordinates does not bring anything back

The instinctive fix is to serialize each tap's simd_float4x4 to JSON. It does not work, because the coordinate system itself is rebuilt from scratch every session.

ARKit places the world origin wherever the device happened to be when tracking started. Launch near the doorway yesterday and beside the sofa today, and identical numbers now point meters apart. Coordinates only mean something alongside the map that interprets them.

That map is ARWorldMap, and it holds three kinds of things:

ElementWhat it isSaved?
Feature pointsThe point cloud the camera has recognized (rawFeaturePoints)Yes
AnchorsYour ARAnchor list — transforms and identifiersYes
3D modelsThe meshes and materials you are renderingNo

That third row costs people a night. ARWorldMap remembers where. It never remembers what. Restore it naively and your anchors come back to an empty screen.

Giving anchors something to say

The fix is to subclass ARAnchor and carry your own payload. World map archiving encodes anchors too, so a correct NSSecureCoding implementation ships your model identifiers along with the map.

final class FurnitureAnchor: ARAnchor {
    // The key that decides which model to rebuild on restore
    let catalogID: String
    let placedAt: Date
 
    init(catalogID: String, transform: simd_float4x4) {
        self.catalogID = catalogID
        self.placedAt = Date()
        super.init(name: "furniture", transform: transform)
    }
 
    // ARKit calls this whenever it copies an anchor inside a session.
    // Skip it and your payload is gone before it ever reaches disk.
    required init(anchor: ARAnchor) {
        let other = anchor as! FurnitureAnchor
        self.catalogID = other.catalogID
        self.placedAt = other.placedAt
        super.init(anchor: other)
    }
 
    override class var supportsSecureCoding: Bool { true }
 
    required init?(coder: NSCoder) {
        guard let id = coder.decodeObject(of: NSString.self, forKey: "catalogID") as String? else {
            return nil  // Older maps: refuse rather than restore garbage
        }
        self.catalogID = id
        self.placedAt = coder.decodeObject(of: NSDate.self, forKey: "placedAt") as Date? ?? Date()
        super.init(coder: coder)
    }
 
    override func encode(with coder: NSCoder) {
        super.encode(with: coder)
        coder.encode(catalogID as NSString, forKey: "catalogID")
        coder.encode(placedAt as NSDate, forKey: "placedAt")
    }
}

When I layer this onto generated code, init(anchor:) is the first thing I check. Leave it out and everything looks fine during the session — only the saved map comes back hollow. You cannot catch that without closing the app on a real device, which makes it the single easiest thing to miss in a code review.

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
Find out why AR placements vanish on relaunch, and add ARWorldMap save/restore in roughly 60 lines of Swift
Sidestep the two traps that silently destroy saved data: mappingStatus timing and NSSecureCoding on custom anchors
Ship an escape hatch for the 30-second relocalization failures that otherwise read as a frozen app
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

Dev Tools2026-07-11
Implementing App Clips with Rork Max — delivering the core of your app the moment someone scans a code
Building on the native Swift that Rork Max produces, this note walks through the 15 MB App Clip budget, receiving the launch URL, and handing state off to the full app.
Dev Tools2026-07-17
Killing the Export Compliance Prompt in Rork Builds for Good
Every Rork and Rork Max build lands in App Store Connect with a Missing Compliance warning. Here is how to decide whether you qualify for the exemption, and how to set it once in app.json or Info.plist so the question never returns.
Dev Tools2026-07-16
Regenerable Zones in Rork Max Code: Keeping the Freedom to Rebuild
Generated code carries an invisible asset: the option to throw it away and rebuild it. Every hand edit quietly expires that option. Here is how I track it with a ledger and CI checks across six live apps.
📚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 →