Messaging & Bridge Infrastructure
Signal ↔ iMessage Gateway
A decentralized, two-part architecture bridging Signal Messenger with Apple iMessage and SMS, supporting native reactions, group chats, and rich media.
Part 1: Gateway Service
Signal to iMessage Gateway
Node.js service managing Signal-side groups, thread roster mappings, Tapback conversions, and signal-cli JSON-RPC communication.
Part 2: Relay Daemon
iMessage & SMS Relay Daemon
Native headless macOS daemon linking against Apple's private IMCore frameworks, providing a REST API and outbox retry queue for iMessage and SMS.
System Architecture
The system is split cleanly across two physical hosts or runtime environments to respect Apple's macOS ecosystem boundaries while enabling seamless operation from any primary Signal device:
+-------------------+
| Your Primary |
| Signal Phone |
+---------+---------+
| (Signal Protocol)
v
+-------------------------------+-------------------------------+
| Gateway Host (Linux VPS, Server, or Local Node) |
| |
| +------------------+ +--------------------------+ |
| | signal-cli RPC |<------->| bridge.js | |
| | Daemon | | (Express + SQLite WAL) | |
| +------------------+ +-------------+------------+ |
+----------------------------------------------|----------------+
| Encrypted Private Network
| (Tailscale / WireGuard / LAN)
v
+----------------------------------------------+----------------+
| macOS Host (macOS 12+ running Native Relay Daemon) |
| |
| +-----------------------+ +-------------------------+ |
| | HTTP Relay Daemon |<--->| macOS iMessage Stack | |
| | (crapple-relay) | | (Apple Private IMCore)| |
| +-----------------------+ +-------------------------+ |
+---------------------------------------------------------------+
How the Two Parts Work Together
| Component | Role & Technology | Responsibilities |
|---|---|---|
| Part 1: Gateway Service signal-imessage-gateway |
Node.js • Express • SQLite (WAL) • signal-cli |
|
| Part 2: Relay Daemon crapple-relay |
Objective-C • Mach XPC • Private IMCore • launchd |
|
Key Features
- Bidirectional Messaging: Send and receive text messages seamlessly between Signal and Apple iMessage.
- Multi-Party Group Chats: Automatic thread creation, participant roster synchronization, and clear inbound sender attribution (
[<sender>]: <message>). Outbound replies route directly back to the iMessage group without requiring sender prefixes. - Native Tapback Reactions: Signal emoji reactions are mapped directly to native Apple Tapbacks (Love, Like, Dislike, Laugh, Emphasize, Question) and sent to both 1-on-1 and group chats.
- Rich Media Support: Transfer photos (JPEG, PNG, HEIC, WebP, GIF), audio messages, and video recordings (MP4, MOV).
- Persistent Outbox Queue: If the gateway or network undergoes temporary downtime, incoming iMessages are persisted on macOS and retried in strict FIFO order until HTTP 200 delivery confirmation is received.
- Zero Disruption to Signal: Every iMessage contact or group conversation maps to an isolated Signal group chat between you and the bot. You can rename the groups anytime in Signal without breaking routing.
Reaction (Tapback) Mapping
| Signal Emoji Reaction | Apple iMessage Tapback |
|---|---|
| ❤️ | Love |
| 👍 | Like |
| 👎 | Dislike |
| 😂 | Laugh |
| ‼️ | Emphasize |
| ❓ | Question |
| Other emojis | Fallback to Like |
Network Topologies
The two services communicate over an authenticated HTTP REST interface (port 5569) secured by Bearer tokens. Recommended deployment topologies include:
- Encrypted Private Mesh (Recommended): Run the gateway on a Linux VPS and the relay on an always-on Mac mini connected via Tailscale or WireGuard. No public router port forwarding is required.
- Local Area Network (LAN): Run both hosts on the same private home or office network using static local IP addresses.
- Single-Node Deployment: Run both
signal-cli, the Node.js gateway, and the native relay daemon directly on the same macOS machine communicating over loopback (127.0.0.1).