Peers

Waking a sleeping phone

The doorbell

A locked iPhone does not run apps, and only Apple can wake one. The doorbell is the small piece of Peers that exists to deal with that.

What it is

A menu-bar app for Mac, separate from Peers itself. Ordinary users never install it and never see it. OPUS runs one so that phones on the App Store build can be woken, and anyone can run one of their own.

Its whole job is to ask Apple to wake a phone. It does not carry your messages: those travel their own way and wait, sealed, in the mailbox.

What it sees

SeesDoesn’t see
A device token, the number Apple uses to identify a phoneWho asked for the wake
The time it was askedWhich chat it belongs to
Whether it is a call or a messageAnything about the message or the call itself

It keeps none of this. Nothing is written down, and everything it held disappears when it quits.

The message and the ring take different paths Your phone on the left, a locked phone on the right. One path runs upward through a doorbell, which wakes the sleeping phone. A separate path runs downward through a mailbox, which holds the sealed message until the phone comes back. you asleep the ring: which phone, and when the mailbox: the sealed pouch, up to 24 hours
The ring and the message travel separately. Neither one carries your name.

If it is not running

Nothing is lost. Your message is already waiting, sealed, in the mailbox. The phone collects it when it next wakes on its own, or when your friend opens the app, so it arrives later rather than never. Calls to a phone that is asleep wait for it to wake.

New-message alerts are also sent with a small delay on purpose, so a few seconds between sending and a buzz is normal.

Running your own

Peers is open source under the GPLv3, apps and doorbell alike, so none of this has to be ours:

  • The relay that carries your sealed messages is a setting in the app. Point it at another one, or at one you run.
  • The doorbell runs on any Mac you leave switched on.
  • The app itself can be built under your own Apple developer account, which makes it independent of OPUS while still chatting with everyone on the App Store build.

One Apple rule. Apple ties push notifications to the account that shipped an app. Waking a phone that runs the App Store build needs OPUS’s Apple key, so that piece stays with OPUS. Phones running your own build are woken with your key, from your own developer account.