◉RORK LABJP
●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SDK 58 — Beta since 09/15 with no stable date yet; running projects in Expo Go has required login since 09/03●WIDGET — A write-up traces an iOS widget that renders black only in production builds●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SDK 58 — Beta since 09/15 with no stable date yet; running projects in Expo Go has required login since 09/03●WIDGET — A write-up traces an iOS widget that renders black only in production builds●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…
Articles/App Dev
◇ App Dev/2026-07-01Advanced

Building SharePlay in Rork Max's Native Swift — Keeping Two Screens in the Same State

Implementation notes on building SharePlay with GroupActivities in Rork Max's native Swift — moving two screens through the same state over FaceTime. Covers declaring the GroupActivity, joining a GroupSession, syncing state with GroupSessionMessenger, handling latency and conflicts, catching up late joiners, and the boundary for bridging from React Native, with the pitfalls I actually hit.

SharePlayGroupActivitiesRork Max236iOS116SwiftUI66

✦ Premium Article

There are moments when you want to look at the same screen together with family who live far away, while on a call — not trading photos one at a time, but where the moment you swipe, their screen shows the same photo too. That "seeing the same thing together" experience is harder to build than it looks, and once it works, it is quietly delightful. As an indie developer who has run a few small utility apps on my own for years — monetized mostly through AdMob on the App Store — I have come to see SharePlay as one of the rare mechanisms that turns "a tool you use alone" into "a space you use with someone."

The foundation for it is GroupActivities. It layers your app's session on top of a FaceTime call and keeps the state aligned across every participant's device. The catch is that this lives entirely in native territory — there is no API you can reach cleanly from JavaScript. That is exactly why it matters that Rork Max now generates native Swift. Here, I will build the smallest SharePlay that moves two screens through the same state, and walk through the spots where I actually got stuck.

Why this is not realistic in the React Native version

Getting this straight up front makes the later design choices easier. The core of SharePlay is the GroupActivities framework: conforming to the GroupActivity protocol, receiving a GroupSession asynchronously, and exchanging low-level messages through GroupSessionMessenger. All of these are tied deeply to Swift types and async sequences — the kind of thing that fits poorly across a bridge.

AspectReact Native (Expo) aloneRork Max native Swift
Conforming to GroupActivityCannot be expressed in JS typesDeclared plainly as a Swift struct
Receiving a GroupSessionAsync sequences are awkward to bridgeTaken directly with for await
State-sync granularityCarries bridge round-trip latencyStays inside native, stays light
System UI integrationHard to surface in the share pickerRides the OS SharePlay UI naturally

At first I assumed a thin wrapper as an Expo native module would be enough. But once I tried to bridge both receiving the GroupSession and the Messenger's send/receive, the state drifted every time it crossed the boundary — a sync that stopped being a sync. For SharePlay, I have concluded that the practical move is to place the heart of the experience on the native side and let React Native only tap "start" and "stop." Because Rork Max generates that central part in Swift, that separation actually holds together as an implementation.

Declaring the "activity" you do together

SharePlay starts by declaring, as a type, what you are doing together. That activity becomes the unit shared among participants. For a "swipe through photos together" experience, you give it the minimum information needed to identify what is being paged.

import GroupActivities
 
struct SharedGalleryActivity: GroupActivity {
    // Identifier for the gallery being viewed together
    var galleryID: String
 
    var metadata: GroupActivityMetadata {
        var meta = GroupActivityMetadata()
        meta.title = "View a gallery together"
        meta.type = .generic     // .generic unless it is video or music
        return meta
    }
}

Choose type by purpose. For synchronized video use .watchTogether, for music .listenTogether, and the system will even handle playback controls for you. But for syncing your own custom screen, .generic is far easier to work with. Set it to .watchTogether and the OS starts expecting a playback UI, which ends up fighting you. I got that wrong at first and spent a while confused about why extra controls kept appearing on screen.

✦

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
✦Follow the full arc in working Swift — from declaring a GroupActivity to joining a GroupSession to tearing it down
✦A minimal design for keeping two devices in the same state with GroupSessionMessenger, plus how to handle latency, conflicts, and catching up people who join late
✦Why SharePlay is not realistic in the React Native version and needs Rork Max's native generation, explained at the implementation level
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-04-26
Native iOS Apps with Rork: SwiftUI to TestFlight
New iPhone projects in Rork are generated in Swift and SwiftUI, and Rork Pro carries them all the way to the App Store. How to tell an old Expo project from a new one, costs in credits, the skeleton prompt, device testing, when to drop into Xcode, and TestFlight submission.
◇ App Dev2026-10-15
When adjustsFontSizeToFit Shrinks Just One Row, Suspect the Box Height, Not the String
Only the 10th row of a list drops to 4pt on iOS, though the data and strings are fine. I read the Yoga rounding and font-fit sources, then counted how often the box comes up short in Node.
◈ Getting Started2026-09-08
Whether You Need Rork Max Is Answered by Your Permissions, Not the Price Page
When I cannot decide between standard Rork and Rork Max, I stop reading the price page. Instead I pull every OS capability my app actually asks for out of app.json and Info.plist, then sort them into what Expo covers, what a config plugin covers, and what truly needs native Swift.