RORK LABJP
PLAY — Google Play's target API level 36 requirement took effect yesterday, August 31. From today, new apps and updates must target Android 16VISIBILITY — Apps still on API 35 stay listed but disappear for users on newer Android versions. No error is raised; new installs simply fade, which makes the change easy to missEXTENSION — If you missed the deadline, an extension through November 1, 2026 can be requested in Play Console — best filed alongside a concrete migration planAPPLE — On the Apple side, the event lands September 9 and iOS 27 is reported to ship September 14. Testing generated apps on iOS 27 hardware before release week is time well spentEXPO — Expo released expo-paste-input on August 28, a native module that brings image, GIF, and sticker paste to React Native TextInputEAS — EAS Observe reached general availability on August 20, putting crash and performance monitoring on the same EAS platform as builds and updatesPLAY — Google Play's target API level 36 requirement took effect yesterday, August 31. From today, new apps and updates must target Android 16VISIBILITY — Apps still on API 35 stay listed but disappear for users on newer Android versions. No error is raised; new installs simply fade, which makes the change easy to missEXTENSION — If you missed the deadline, an extension through November 1, 2026 can be requested in Play Console — best filed alongside a concrete migration planAPPLE — On the Apple side, the event lands September 9 and iOS 27 is reported to ship September 14. Testing generated apps on iOS 27 hardware before release week is time well spentEXPO — Expo released expo-paste-input on August 28, a native module that brings image, GIF, and sticker paste to React Native TextInputEAS — EAS Observe reached general availability on August 20, putting crash and performance monitoring on the same EAS platform as builds and updates
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 Max232ARKit2ARWorldMapSwift47indie development38

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 $15 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-19
When Rork Max's Two-Click Submit Stalls, Tell Which Layer Broke
Rork Max's one-click install and two-click submit fold the complexity of iOS shipping into four hidden layers. When the abstraction leaks and your submission stalls, this map helps you tell which layer failed and fix it yourself.
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.
📚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 →