Oct 2026 · Personal project · iOS + watchOS, built solo

DiTether

Your Apple Watch, telling you you've left your iPhone behind

DiTether makes my Apple Watch tap me the moment I walk away from my iPhone, then helps me find it. The watch keeps its own Bluetooth link to the phone and reads its signal strength: a fading signal gives a gentle first reminder, a dropped link a loud alert, and walking back makes the watch tap faster, like a metal detector. No internet, no account, no server, and tested on my own iPhone and Apple Watch.

apps + watch face widget
2 + 1
lines of Swift
5.9k
Apple frameworks
8
servers
0

01The problem

Why I built it

Leaving a phone in a café or a taxi is easy, and Apple's built-in "Notify When Left Behind" only tells you once you're far away. The obvious fix, watching the watch's connection to the phone, turned out to lie: with the watch on Wi-Fi, Apple's link stays "connected" through iCloud even when the phone is across town, so nothing ever alerts. Reviews of competing apps add three more complaints: false alarms while the phone is in your bag, batteries drained by noon, and alarms that won't stop. DiTether had to warn within seconds, never cry wolf, and last a full day.

02Screens

Inside the apps

The main screens on the iPhone and the Apple Watch, and the SwiftUI views each one is built from. Pick a screen to see its layout and where its data comes from.

iPhoneditether://iphone/status
<StatusHero />
<KeepOpenCard />
<TestAlertSection />
<SetupStepLink />
<ProtectionToggle />
<RingMyWatch />

One card with one answer, "You're protected" or what to fix with the button for it, the keep-open reminder, a test alert, the setup steps left and Ring my watch.

Data

  • protectionStatus
  • WatchStatus (from the watch)
  • send(.ringWatch)

03How it's built

Follow one alert

DiTether is two native apps: an iPhone app that keeps a Bluetooth beacon on, and a watch app that decides everything. Scroll to follow one alert from the table to your wrist.

01 / 07 · The user

You walk out without your phone

The iPhone is on the café table; the watch is on your wrist, with DiTether running in the background all day.

Smart Stack: DiTether · 3:12:44

Follow one alert

Watch appwatchOS 10 · background

Zooming in on the watch

One watch app, split by job

ditether · watch app8 parts · 0 servers

  • Alert engine
  • Bluetooth range
  • Background session
  • GPS & safe places
  • Alerts & haptics
  • Hot/cold guide
  • Connection log
  • Complication
  1. XcodeGen
  2. xcodebuild (device + simulator)
  3. Install from Xcode
  4. Walk test + connection log

04Inside the system

Two apps, one watchful wrist

  1. 01 · The map

    Two apps, one watchful wrist

    The iPhone app is for setup and looking back; everything that decides runs on the watch. Two links connect them: DiTether's own Bluetooth link, which feels the distance, and Apple's WatchConnectivity, which carries settings, history, pings and commands. On the watch, eight parts react to each other's signals.

  2. 02 · iPhone

    The iPhone app

    Where you set DiTether up and look back: the status card, the setup checklist, detection mode, alert timing, safe places, history with a map, test alerts and Ring my watch. In the background it keeps a Bluetooth beacon on for the watch, answers its pings, and rings at full volume when the watch asks.

    PhoneModel.protectionStatus → .protected
    Owns
    settings.json · events.json (left out of backups)
    • One status card with one answer, and a button that fixes it.
    • Stops sharing its location while the watch's Bluetooth link works.
    • Opening the app stops the ringing and puts the volume back.
    • SwiftUI
    • CBPeripheralManager
    • MapKit
    • AVFoundation
    • HKHealthStore.startWatchApp
  3. 03 · Link one

    DiTether's own Bluetooth link

    DiTether's own direct connection: the iPhone advertises a private Bluetooth service, the watch connects and reads the signal strength. It can't be carried over Wi-Fi or iCloud, so when it fades or drops, the phone really is getting away.

    peripheral.readRSSI() → −71 dBm
    • The iPhone advertises only while protection is on and Bluetooth is allowed.
    • After a drop the connect request stays pending, so it reconnects by itself back in range.
    • Scans run in short bursts, never non-stop.
    • CBPeripheralManager
    • CBCentralManager
    • State restoration
  4. 04 · Link two

    WatchConnectivity

    Apple's link between the two apps. Settings travel as application context (the newest copy wins), history and status as queued transfers, and pings, test alerts and ring commands as live messages. It works over Bluetooth, Wi-Fi or iCloud, which is exactly why it can't be trusted alone to say the phone is near.

    sendMessageData(ping) → pong in 120 ms
    • Settings that fail to send (watch app not installed yet) are kept and retried.
    • The snooze syncs on its own clock, so an edit on the other device never undoes it.
    • Test alerts and ring commands are live only, never queued for later.
    • WCSession
    • Application context
    • transferUserInfo
    • sendMessage
  5. 05 · Decides everything

    ProtectionEngine

    The watch's brain. One loop (every 2 s while something is happening, every 10 s while resting on a strong Bluetooth link) turns signals into a phase: watching, apart, first reminder, loud alert or quiet. Every alert is double-checked before it fires.

    phase = .strongAlerted(since: 10:42:07)
    Owns
    watch-events.json
    Publishes
    phase · watching, apart, alerting, quiet
    Reads
    proximity, location, link, session
    • A strong Bluetooth signal overrules every other signal: no alarm while the phone is in your bag.
    • Snooze, quiet hours and safe places mute alerts but never stop watching.
    • Long separations go calm: GPS every 2 minutes, loop every 10 s.
    • Swift concurrency
    • @MainActor
    • Combine
    • Generation checks
  6. 06 · Bluetooth signal strength

    ProximityMonitor

    Connects to the iPhone's beacon and reads the signal every 3, 5 or 10 seconds depending on the detection mode, smoothed so one bad reading changes nothing. Below −84 dBm, or two missed readings, is weak; a disconnect is lost.

    signal = .weak (−86 dBm)
    Publishes
    proximity · strong, weak, lost
    • It must climb back above −78 dBm to count as strong, so an edge signal doesn't flicker.
    • Shows the live signal on the watch, with the reason when there is none.
    • Hot/cold trend from the last four readings.
    • CBCentralManager
    • readRSSI
    • Exponential smoothing
  7. 07 · Stays running

    KeepAliveSession

    A workout session with its live workout builder keeps the app running with the wrist down. Nothing is measured and the workout is discarded at the end. Pauses are resumed, a crash is recovered, and an unexpected end is announced.

    HKWorkoutSession.startActivity(with: .now)
    Publishes
    session · running, ended
    • Nothing is ever read from or saved to Health.
    • watchOS only allows starting on screen, so Open on watch from the iPhone restarts it.
    • "DiTether stopped watching" if it ends on its own.
    • HealthKit
    • HKLiveWorkoutBuilder
    • WKApplicationDelegate
  8. 08 · Distance & safe places

    WatchLocation

    Remembers where the phone was when you parted, measures how far you walk from that spot, and whether you are inside a safe place. Precise only while it matters.

    distanceFromSpot = 46 m (±8)
    Publishes
    location · fix
    • Readings worse than 65 m or older than 30 s never count.
    • The reading's own error margin is subtracted, so GPS jitter can't fake a walk-away.
    • Standing still, tracking restarts to get a fresh reading.
    • CoreLocation
    • Background location
  9. 09 · Taps, buzzes, notifications

    AlertCenter

    Plays the first reminder and the loud alert in the chosen vibration style (Light, Standard, Persistent) and schedules backup notifications ahead of time, so the alert still comes if watchOS suspends the app.

    alerts.strong(repeatMinutes: 5, style: .persistent)
    Reads
    phase
    • Opening the app during an alert stops the buzzing.
    • A dead-man's-switch notification fires by itself if the app stops.
    • Test alerts use their own id, so they never cancel a real one.
    • UserNotifications
    • WKHapticType
  10. 10 · Hot/cold taps

    GuideHaptics

    When you turn back toward where you left the phone, the loud alert pauses and the watch taps faster as you get closer, like a metal detector: one tap every 3 s at 200 m, about three a second within 10 m.

    interval(forMeters: 25) → 0.56 s
    Reads
    phase, proximity, location
    • Turning back means 30 m away, then 20 m closer: more than GPS wobble.
    • Walking away again brings the loud alert back.
    • Automatic taps stop after 10 minutes.
    • GPS distance
    • Bluetooth RSSI
    • WatchKit haptics
  11. 11 · What the watch decided

    ConnectionLog

    Records every decision with a time and a reason: link dropped, signal weak, heading back, quiet at Home, session stopped. Read on the watch right after a walk test.

    10:42:07 Apart: Bluetooth link lost
    Owns
    connection-log.json (150 entries)
    Reads
    phase, session, proximity
    • Only changes are written, never every ping.
    • Never leaves the watch.
    • Codable
    • SwiftUI List
  12. 12 · Status on the watch face

    Complication

    Nearby, Apart, Left?, Quiet or Off on the watch face, in four sizes. The app writes a tiny status to a shared App Group and reloads the widget only when it actually changes.

    WidgetCenter.shared.reloadAllTimelines()
    Reads
    phase
    • Refreshes only on real changes, so it costs nothing at rest.
    • WidgetKit
    • App Group
  13. 13 · One alert's journey

    From a fading signal to finding your phone

    The signal falls below −84 dBm → ProximityMonitor says weak → ProtectionEngine starts a separation and the first reminder taps → the link drops → loud alert (unless the iPhone answers a ping in under 0.8 s: then it just restarted, and the alert waits 15 s for Bluetooth) → you turn back → the alert pauses and the taps speed up → signal strong → a "back" tap, and the episode lands in the iPhone's History.

    weak → .softAlerted → lost → .strongAlerted → heading back → .watching
  14. 14 · Battery

    Bluetooth first, everything else slows down

    While the Bluetooth link is strong, the loop runs every 10 s, pings drop to one every 2 minutes, the watch reads its position about every 2 minutes, and the iPhone stops sharing its location. Long separations and safe places go calm too. The first reminder and the loud alert stay instant: only how often things are checked changes.

    restingOnBluetooth → tick 10 s · ping 120 s · GPS ~2 min

05Features

What DiTether does

  • Bluetooth range

    The watch keeps its own Bluetooth link to the iPhone. A fading or stuttering signal gives the first reminder; a dropped link gives the loud alert. Wi-Fi can't fool it.

  • Two-step alerts

    A short tap first, then a loud alert that repeats until the phone is back or you silence it, in Light, Standard or Persistent vibration.

  • Hot/cold finder

    Turn back toward where you left the phone and the watch taps faster as you get closer, from one tap every 3 s at 200 m to three a second within 10 m.

  • Ring either device

    Ring iPhone plays a loud beep for 30 s even on silent, raising the volume and vibrating. Ring my watch does the same the other way.

  • No false alarms

    Every alert is double-checked, a strong Bluetooth signal overrules everything else, and an iPhone that just restarted gets 15 s to come back.

  • Quiet when it's fine

    Safe places such as home, quiet hours and snooze. Quiet isn't off: walking out of a safe place without the phone alerts at once.

  • Speed or battery

    Fast, Balanced or Battery Saver, with what each costs written out. While Bluetooth is healthy, everything else slows down on its own.

  • History with a map

    Every episode with where it happened, how far you walked and for how long, plus a link to open the spot in Maps.

  • Setup that guides you

    An intro, a live checklist whose steps open the right place, and one status card that always says what to fix and has the button for it.

  • Watch face complication

    Nearby, Apart, Left?, Quiet or Off on the watch face, in four sizes, refreshed only when it changes.

  • Connection log

    The watch writes down each decision with a time and a reason, so a walk test shows exactly what happened.

  • Private by design

    No account, no server, no analytics. Locations and history stay on the two devices and out of iCloud backups.

06Tech stack

What it's built with

Apps

  • Swift 5
  • SwiftUI
  • iOS 17
  • watchOS 10
  • Swift concurrency
  • Combine

Sensing

  • CoreBluetooth (peripheral + central, RSSI)
  • CoreLocation
  • WatchConnectivity

Background & alerts

  • HealthKit workout session
  • HKLiveWorkoutBuilder
  • UserNotifications
  • WatchKit haptics
  • WidgetKit + App Group
  • AVFoundation (generated tone)
  • MediaPlayer (volume)

Tooling & testing

  • XcodeGen
  • Xcode 26 · xcodebuild
  • On-device testing (iPhone + Apple Watch)
  • On-watch connection log
  • swiftc test runs

07Under the hood

How a few parts work

Why Bluetooth, not "reachable"

  1. 1The first versions trusted WatchConnectivity's reachable flag and live pings. On a walk test, nothing alerted.
  2. 2The cause: with the watch on Wi-Fi, Apple relays the link through iCloud, so the phone stays reachable and answers pings from anywhere.
  3. 3So the iPhone app advertises a private Bluetooth service and the watch connects to it directly. A direct link can't be relayed: when you leave, it really fades and drops.
  4. 4The signal is smoothed, weak below −84 dBm and strong again only above −78 dBm, and once it works it overrules every weaker signal.

An alert you can trust

  1. 1Before any alert the watch double-checks: is the Bluetooth signal really weak, did the phone really stop answering?
  2. 2GPS readings with a large error margin or older than 30 s never count, and the margin itself is subtracted from every distance.
  3. 3Right after an iPhone restart the beacon is gone. The watch's ping relaunches the iPhone app, and a reply in under 0.8 s holds the loud alert for 15 s.
  4. 4Opening the app during an alert stops the buzzing, and test alerts use their own id so they can never cancel a real one.

A full day on one charge

  1. 1The workout session that keeps the app alive is the one fixed cost, so everything else is paced around Bluetooth.
  2. 2While the link is strong: a loop every 10 s, a ping every 2 minutes, a position about every 2 minutes, and no location sharing on the iPhone.
  3. 3Apart for long, or quiet at a safe place: GPS goes from continuous to one reading a minute or every 2 minutes.
  4. 4Bluetooth scans run in 10-second bursts with growing pauses, and automatic hot/cold taps stop after 10 minutes.

Staying alive in the background

  1. 1watchOS suspends apps seconds after the wrist goes down; a workout session is the one sanctioned way to keep running.
  2. 2DiTether runs it the way Apple documents it, a session plus its live workout builder, but collects nothing and discards the workout.
  3. 3A paused session is resumed, one left running after a crash is recovered, and an unexpected end raises "DiTether stopped watching".
  4. 4watchOS only allows starting a session on screen, so "Open on watch" on the iPhone launches the watch app and restarts it.

Finding it, hot and cold

  1. 1When you part, the watch keeps the spot: the position it read while the phone was still with you.
  2. 2You've turned back once you've been 30 m away and then come 20 m closer, more than GPS wobble.
  3. 3The loud alert pauses and the taps speed up with distance; up close the Bluetooth signal takes over, and the faster of the two sets the pace.
  4. 4Walk away again and the loud alert comes back, so a short turn can never silence it.

Settings that never get lost

  1. 1Both devices keep a copy; the newer copy wins, but the snooze carries its own timestamp so an edit on the iPhone never undoes a snooze from the watch.
  2. 2Both sides merge the same way, so they always end up identical, checked with a test run.
  3. 3Settings that couldn't be sent yet (watch app not installed) are kept and retried on every chance.
  4. 4Saved files decode with defaults for missing fields, so a new version never wipes safe places or history.

08Build log

How it came together, step by step

15 steps, each built for both a real device and the simulator with zero errors before the next began, and the core tested on my own iPhone and Apple Watch. Open a step to see what it added.

  1. 01BothResearch and first versionWhich signals an app can use to know the phone is gone, then the whole first version: the watch's alert engine, a workout session to stay alive, sync, and the iPhone's settings and history.
    • Two-step alerts: a gentle tap, then a loud repeating alert
    • Walk-away distance from the spot where you parted
    • Safe places, quiet hours, snooze and a dead-man's-switch notification
  2. 02BothFirst buildAn XcodeGen spec for the targets, a one-command setup script, and the first build on Xcode with zero errors.
    • Built for device and simulator from the command line
    • Both apps launched in the simulators
    • Signing and bundle prefix in one config file
  3. 03iPhoneA UI a new user can followThe first screens answered nothing at a glance. They became one honest status card, an intro, a live setup checklist and simpler settings.
    • The status card can never say "protected" when it isn't
    • "Tier 1 / Tier 2" became First reminder and Loud alert
    • A watch intro that explains each permission before the system asks
  4. 04BothConnection fixes and test alertsSettings were lost during setup, "Connecting…" could last forever, and the watch said "Signal lost" at launch.
    • Unsent settings kept and retried when the watch app appears
    • An 8-second start-up grace
    • Send a test alert from the iPhone to the watch
  5. 05WatchMeasuring the distance to the iPhoneThe iPhone shares its position in every ping reply, so the watch can measure how far apart they really are.
    • Combined GPS error margin subtracted from the distance
    • A connection log on the watch
    • Faster pings and tighter defaults
  6. 06BothDetection modesFast, Balanced and Battery Saver: the user picks speed or battery, honestly labelled.
    • Ping, GPS and sharing rates per mode
    • Saved files that tolerate missing fields, so new settings never wipe safe places
  7. 07WatchBackground session rewrite and a full reviewThe workout session stopped when leaving the app. Rewritten the way Apple documents it, then the whole codebase reviewed for bugs.
    • Live workout builder, pause and stop handling, crash recovery
    • Seven bugs fixed, from stale GPS to a backup alert after turning protection off
    • Snooze syncs on its own clock
  8. 08BothBluetooth rangeThe real reason no alert came: over Wi-Fi or iCloud, Apple's link stays "connected" across town. DiTether got its own Bluetooth link.
    • iPhone beacon, watch reads the signal strength
    • Weak signal: first reminder · dropped link: loud alert
    • Live signal bars on the watch
  9. 09WatchTested on the deviceThe first walk test crashed the watch the moment background GPS turned on. Fixed at the root, then the Bluetooth alerts worked on my wrist.
    • The location mode moved to the Info.plist key Core Location actually checks
    • A guard so it can never crash this way again
    • The watch shows why it isn't connected
  10. 10BothBattery: Bluetooth firstWith Bluetooth working, the other signals slow right down while it is healthy and come back the moment it isn't.
    • iPhone location sharing off while linked
    • Pings every 2 minutes, loop every 10 s
    • Protection switch on the watch's main screen
  11. 11iPhoneDiTether, and steps that open the right placeRenamed, and every setup step now takes you where it needs: the Watch app, the watch app itself, or the Settings app.
    • "Open on watch" launches the watch app from the iPhone and restarts its session
    • No bundle id changes, so saved data is kept
  12. 12BothFeatures from competitor researchThree competing apps' features and reviews compared; what was missing got built.
    • Ring iPhone and Ring my watch
    • Hot/cold finder, vibration styles, alarm stops when the app opens
    • No false alarm after an iPhone restart, and a watch face complication
  13. 13WatchMetal-detector tapsTurning back is detected with GPS; the loud alert pauses and the watch taps faster as you get closer.
    • Bluetooth takes over up close, the faster pace wins
    • Walking away again brings the loud alert back
  14. 14BothBattery auditEverything that runs repeatedly checked for drain; seven fixes.
    • Calm mode for long separations and safe places
    • Bluetooth scans in bursts, backup notification every 2 minutes
    • Hot/cold taps and precise GPS capped at 10 minutes
  15. 15iPhoneRing at full volume"Ring iPhone" followed the volume, so a quiet phone stayed quiet.
    • Volume raised to the maximum while ringing and put back afterwards
    • A harsher 2.9–3.4 kHz tone generated in code
    • Vibration with every beep

Problems that took real work

ProblemI walked far from my phone and nothing happened: with the watch on Wi-Fi, Apple's watch–phone link stayed "reachable" through iCloud, and pings were answered from across town.

FixDiTether's own Bluetooth link between the two apps, which can't be relayed over the internet. Its signal strength now drives the alerts, and it overrules every weaker signal.

ProblemThe watch app crashed the moment the phone went out of range.

FixCore Location checks UIBackgroundModes, not the watch's WKBackgroundModes, before allowing background GPS. The key moved, and a check now skips background GPS instead of crashing if it is ever missing.

ProblemThe background workout session ended when I left the app, and nothing said so.

FixThe session now runs with Apple's live workout builder, resumes when paused, is recovered after a crash, announces an unexpected end, and can be restarted from the iPhone.

ProblemHome and safe places added during setup never reached the watch: the settings were sent once, before the watch app was installed.

FixUnsent settings are kept and retried when the connection starts, the watch app appears, or the watch becomes reachable.

ProblemAdding one new setting would have thrown away the whole saved file, safe places included.

FixEvery field decodes with a default when missing, tested against a file from the earlier version.

ProblemA user standing still got no fresh GPS readings, which could end a real alert or set off a false one at home.

FixWhen the last reading is older than 20 s, tracking restarts to force a fresh one, and a separation started by distance only ends on proof you are close again.

ProblemAfter an iPhone restart its Bluetooth beacon is gone, which looked exactly like leaving the phone behind.

FixThe watch's ping relaunches the iPhone app. A reply in under 0.8 s means the phone is right here, so the loud alert waits 15 s for Bluetooth to return.

Problem"Ring iPhone" followed the volume, so a phone turned down stayed quiet.

FixThe volume is raised to the maximum through the system volume slider while ringing and put back afterwards, with a harsher generated tone and vibration.

09Shipping

From Xcode to my wrist

  1. 01One project.yml describes the three targets; setup.sh installs XcodeGen, writes the bundle prefix and team, and generates the Xcode project.
  2. 02Every change is built for a real device and for the simulator with xcodebuild, with zero errors and zero warnings as the bar.
  3. 03Small pieces of logic, like the settings merge and reading files from older versions, are checked with standalone swiftc test runs.
  4. 04Builds are installed from Xcode onto my own iPhone and Apple Watch and walk-tested outdoors; the watch's connection log shows every decision with a time.
  5. 05Crashes on the device are read in Xcode's debugger and fixed at the root, with a guard so the same mistake can't crash it again.

10My role

What I did

DiTether is my own project from the idea to my wrist: I set the goal, researched the problem and the competition, made the design calls, and tested every build on my own iPhone and Apple Watch.

  1. 01

    Research

    Mapped the signals an app can use, compared three competitors' features and reviews, and turned the gaps into the backlog.

  2. 02

    Detection design

    Found on a walk test that Apple's link lies over Wi-Fi, and moved detection to a direct Bluetooth link with a two-step escalation.

  3. 03

    Device testing

    Walk tests on real hardware with the connection log, and crashes read in Xcode's debugger and fixed at the root.

  4. 04

    Battery

    Chose what may slow down and what must stay instant, then audited everything that repeats until it lasts a full day.

  5. 05

    Product & UX

    A status card that never lies, a guided setup, simpler settings, short alerts and the name DiTether.

  6. 06

    Finding features

    Ring iPhone at full volume, Ring my watch, and metal-detector taps that lead you back to the spot.

Built solo in October 2026 as a personal project: one XcodeGen project with three targets (the iPhone app, the watch app and the watch face complication). I wrote it with Claude Code as my AI pair programmer, directing the design and testing every change on my own devices.