RORK LABJP
BUILD — Rork Max runs real Macs in the cloud loaded with Xcode and the iOS SDK, writing SwiftUI, compiling, reading the errors and building again. That loop, not the code generation, is what lifts the outputNATIVE — What comes out is pure Swift and SwiftUI, not React Native. Reaching AR, Metal graphics and widgets that React Native cannot touch is the real gap between this and other buildersPLATFORMS — Coverage spans iPhone, iPad, Apple Watch, Apple TV and Vision Pro, plus iMessage. Worth a look if you want to start from a watch app or an extension rather than a phone screenCOMPANION — The Rork Companion app lets you check a generated build on a real iPhone without a paid Apple Developer account, lowering the bar for trying a first project end to endPRICING — Free to start, paid plans from $25 a month, and Rork Max on the $200 Max plan. Worth working out up front how many projects it takes to earn that backDEADLINE — From August 31, 2026, Google Play requires target API level 36 or higher for new apps and updates alike. Ten days out, and the targetSdkVersion of what you generate is yours to verifyBUILD — Rork Max runs real Macs in the cloud loaded with Xcode and the iOS SDK, writing SwiftUI, compiling, reading the errors and building again. That loop, not the code generation, is what lifts the outputNATIVE — What comes out is pure Swift and SwiftUI, not React Native. Reaching AR, Metal graphics and widgets that React Native cannot touch is the real gap between this and other buildersPLATFORMS — Coverage spans iPhone, iPad, Apple Watch, Apple TV and Vision Pro, plus iMessage. Worth a look if you want to start from a watch app or an extension rather than a phone screenCOMPANION — The Rork Companion app lets you check a generated build on a real iPhone without a paid Apple Developer account, lowering the bar for trying a first project end to endPRICING — Free to start, paid plans from $25 a month, and Rork Max on the $200 Max plan. Worth working out up front how many projects it takes to earn that backDEADLINE — From August 31, 2026, Google Play requires target API level 36 or higher for new apps and updates alike. Ten days out, and the targetSdkVersion of what you generate is yours to verify
Articles/Dev Tools
Dev Tools/2026-07-04Advanced

Direct Device-to-Device Sharing in Rork Max Apps — The Local Network Permission Trap That Makes MultipeerConnectivity Fail Silently

How to add serverless, nearby device-to-device sharing to a native Swift app generated by Rork Max. It works in the simulator but no peers ever appear on real devices — and the culprit is almost always a silent Local Network permission failure.

Rork Max233MultipeerConnectivityLocal NetworkSwift48iOS110offline sharing

Premium Article

I wanted to hand a piece of in-app data to someone standing right next to me — say, pushing a wallpaper preset straight to a friend's phone — without a server or an account in between. When I built this with Rork Max, the generated Swift ran perfectly in the simulator and the peer list filled with mocks. But on two real devices, one phone never appeared on the other. No error, no callback, just silence. Chasing it down, the problem was not my use of MCSession at all. It was the Local Network permission one layer earlier, rejecting me without a word.

That silent failure is the first wall you hit when building nearby communication with MultipeerConnectivity. As an indie developer who keeps shipping apps, I've learned that permission gaps are especially nasty because they only surface on hardware. This article walks through dropping a device-to-device sharing feature into a Rork Max native app with the smallest possible diff: how to isolate the permission trap, and a wrapper you can use as-is.

Why connect devices directly instead of going through a server

Routing nearby sharing through a backend means that even with the other person right in front of you, the data takes a detour: upload, round-trip through a server, download. It won't work offline, it costs you server bills, and it can force account linking just to move a piece of throwaway data.

MultipeerConnectivity is Apple's own framework that automatically bundles Wi-Fi and Bluetooth to discover nearby devices — whether on the same Wi-Fi or fully offline peer-to-peer — and stream data directly between them. For "good enough if you can just hand it over" data like wallpapers or presets, I think not owning a server is the more honest choice. On the small apps I run under Dolice Labs, deciding not to add a backend for a single feature pays off in operating cost too.

If, on the other hand, your goal is permanent cross-device sync, designing cross-device data sync with CloudKit is the better fit. The key with nearby sharing is to scope it to "here and now" use cases.

Separate MultipeerConnectivity into three roles

This framework gets far clearer once you split it into three actors.

  1. Advertiser: announces "I'm here" to those around you. Uses MCNearbyServiceAdvertiser.
  2. Browser: looks for nearby advertisers and, when it finds one, sends an invitation. Uses MCNearbyServiceBrowser.
  3. Session: the pipe that actually moves data once an invitation is accepted. That's MCSession.

When the same app plays both advertiser and browser at once, either device can discover and invite the other. This "announce both ways, search both ways" setup is the easiest to work with for nearby sharing, in my experience.

serviceType is the shared keyword that ties these three together. It has strict naming rules described below, and if you break them, both advertiser and browser quietly stop working.

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
If you were stuck on peers never showing up on real devices with no error at all, you can now isolate from logs whether the Local Network permission or the Bonjour service type is to blame
You get a thin, ready-to-drop-in wrapper that handles the full state flow: invitation, MCSession establishment, and recovery after disconnect
You'll know exactly where to fill in the permission, Info.plist, and background constraints by hand — the parts Rork Max's generated code cannot cover
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-13
Losing HealthKit Data on Incremental Sync — Designing HKQueryAnchor Persistence
When step or sleep data double-counts or goes missing on incremental HealthKit sync, the root cause is usually HKQueryAnchor persistence. Here is a working Swift design that handles newAnchor and deletedObjects correctly and stays consistent across reinstalls and background updates.
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-08
Working Around Rork Max's 20-Geofence Wall with Dynamic Re-registration
In a native Swift app generated by Rork Max, geofences you registered quietly stop firing past a certain count — and it's almost always iOS's silent limit of 20 monitored regions per app. Here's a dynamic re-registration design that keeps only the nearest 20 live, plus a Swift implementation you can drop in.
📚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 →