◉RORK LABJP
●EXPO — EAS Observe now records native crashes (Oct 7). On SDK 57, update to 57.0.21 or later●SDK 58 — SDK 58 Beta has been out since Sep 15. The stable date is still unconfirmed●RN 0.88 — React Native 0.88.x is scheduled for Oct 12, 3 days left●Q&A — People are asking why expo-widgets render blank only in production builds●RORK — GPT-6.1 Sol was added on Sep 29, available on Pro and Max plans●NEW — Building an app for a client? Decide who owns the publishing account first●EXPO — EAS Observe now records native crashes (Oct 7). On SDK 57, update to 57.0.21 or later●SDK 58 — SDK 58 Beta has been out since Sep 15. The stable date is still unconfirmed●RN 0.88 — React Native 0.88.x is scheduled for Oct 12, 3 days left●Q&A — People are asking why expo-widgets render blank only in production builds●RORK — GPT-6.1 Sol was added on Sep 29, available on Pro and Max plans●NEW — Building an app for a client? Decide who owns the publishing account first
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 Max235MultipeerConnectivityLocal NetworkSwift48iOS115offline 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 $15 for lifetime access
View Membership →

Related Articles

⬡ Dev Tools2026-04-05
Rork Max × WidgetKit & Live Activities in Practice — From Home Screen to Dynamic Island
A complete guide to implementing iOS Widgets, Lock Screen widgets, and Dynamic Island Live Activities with Rork Max. Covers WidgetKit fundamentals, Timeline update strategies, App Intents integration, and monetization.
⬡ Dev Tools2026-05-16
Migrating Firebase CocoaPods to SPM in Rork Max Apps
Firebase Apple SDK's CocoaPods distribution ends in October 2026. Here's a detailed migration log from moving 4 Rork Max iOS apps to Swift Package Manager — including dSYM failures, module errors, and the Dropbox conflict copy problem you'll definitely hit.
⬡ Dev Tools2026-05-01
Adding a Notification Service Extension to a Rork App — Rich Push, Encrypted Payloads, and Dynamic Rewriting
Wiring a Notification Service Extension into a Rork-built iOS app — image attachments, end-to-end encrypted payloads, and dynamic APNs payload rewriting — with working Swift code and the production pitfalls that bit me along the way.
📚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