|
| 1 | +<p align="center"> |
| 2 | + <img src="resources/icon.png" alt="iOS Simulator Push Notifier" width="128" height="128" /> |
| 3 | +</p> |
| 4 | + |
| 5 | +<h1 align="center">iOS Simulator Push Notifier</h1> |
| 6 | + |
| 7 | +<p align="center"> |
| 8 | + <strong>A native macOS app to craft, organize, and send push notifications to the iOS Simulator.</strong> |
| 9 | +</p> |
| 10 | + |
| 11 | +<p align="center"> |
| 12 | + <img src="https://img.shields.io/badge/platform-macOS-blue?style=flat-square" alt="macOS" /> |
| 13 | + <img src="https://img.shields.io/badge/electron-39-47848f?style=flat-square&logo=electron&logoColor=white" alt="Electron" /> |
| 14 | + <img src="https://img.shields.io/badge/react-19-61dafb?style=flat-square&logo=react&logoColor=white" alt="React" /> |
| 15 | + <img src="https://img.shields.io/badge/typescript-5.9-3178c6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript" /> |
| 16 | +</p> |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## Why? |
| 21 | + |
| 22 | +Testing push notifications on the iOS Simulator normally means hand-editing JSON files and running `xcrun simctl push` from the terminal. **iOS Simulator Push Notifier** gives you a visual editor, folder-based organization, and one-click delivery — so you can focus on building your app instead of wrestling with payloads. |
| 23 | + |
| 24 | +## Features |
| 25 | + |
| 26 | +### 🔔 Full APNS Payload Editor |
| 27 | + |
| 28 | +Build complete Apple Push Notification payloads without touching JSON. Edit the alert title, subtitle, body, badge, sound, category, thread ID, content-available, mutable-content, and arbitrary custom data fields — all from a clean form UI. A live JSON preview keeps you in sync. |
| 29 | + |
| 30 | +### 📁 Folder Organization |
| 31 | + |
| 32 | +Group notifications into folders just like Apple Notes. Create, rename, reorder, and delete folders. Move all notifications from one folder to another in a single action. An **All Notifications** view shows everything at a glance. |
| 33 | + |
| 34 | +### 📱 Simulator Auto-Detection |
| 35 | + |
| 36 | +Booted simulators are detected automatically and refresh every 5 seconds. Installed apps are discovered via `simctl listapps`, so you can pick the target bundle identifier from a dropdown instead of typing it by hand. |
| 37 | + |
| 38 | +### ▶️ One-Click Send |
| 39 | + |
| 40 | +Hit **Run** (or <kbd>⌘R</kbd>) to push the current notification to the selected simulator instantly. |
| 41 | + |
| 42 | +### 📤 Import & Export `.apns` Files |
| 43 | + |
| 44 | +- **Import** — Open `.apns` / `.json` files via the file picker or **drag-and-drop** them onto a folder. |
| 45 | +- **Export** — Download any notification as a portable `.apns` file. |
| 46 | + |
| 47 | +### ⏱️ Scheduling |
| 48 | + |
| 49 | +Send a notification once after a delay, or set up a recurring cron schedule. Active schedules survive app restarts and show a status banner in the editor. |
| 50 | + |
| 51 | +### ⌨️ Keyboard Shortcuts |
| 52 | + |
| 53 | +| Action | Shortcut | |
| 54 | +| -------------------- | ----------------- | |
| 55 | +| New Notification | <kbd>⌘N</kbd> | |
| 56 | +| New Folder | <kbd>⌘⇧N</kbd> | |
| 57 | +| Delete | <kbd>⌘⌫</kbd> | |
| 58 | +| Run Notification | <kbd>⌘R</kbd> | |
| 59 | +| Schedule | <kbd>⌘⇧S</kbd> | |
| 60 | + |
| 61 | +### 🌙 Dark Mode |
| 62 | + |
| 63 | +Ships with a dark theme that respects the native macOS look and feel. |
| 64 | + |
| 65 | +--- |
| 66 | + |
| 67 | +## Tech Stack |
| 68 | + |
| 69 | +| Layer | Technology | |
| 70 | +| ----------- | ------------------------------------------------ | |
| 71 | +| Shell | [Electron](https://www.electronjs.org/) 39 | |
| 72 | +| Build | [electron-vite](https://electron-vite.org/) | |
| 73 | +| Renderer | [React](https://react.dev/) 19 + TypeScript 5.9 | |
| 74 | +| Styling | [Tailwind CSS](https://tailwindcss.com/) 4 + [shadcn/ui](https://ui.shadcn.com/) | |
| 75 | +| Database | [SQLite](https://www.sqlite.org/) via better-sqlite3 | |
| 76 | +| Scheduling | [node-cron](https://github.com/node-cron/node-cron) | |
| 77 | +| Simulator | `xcrun simctl push` (Xcode CLI) | |
| 78 | + |
| 79 | +--- |
| 80 | + |
| 81 | +## Getting Started |
| 82 | + |
| 83 | +### Prerequisites |
| 84 | + |
| 85 | +- **macOS** with [Xcode](https://developer.apple.com/xcode/) installed (for `xcrun simctl`) |
| 86 | +- **Node.js** 20+ |
| 87 | +- At least one booted iOS Simulator |
| 88 | + |
| 89 | +### Install & Run |
| 90 | + |
| 91 | +```bash |
| 92 | +# Clone the repo |
| 93 | +git clone https://github.com/your-username/ios-simulator-push-notifier.git |
| 94 | +cd ios-simulator-push-notifier |
| 95 | + |
| 96 | +# Install dependencies |
| 97 | +npm install |
| 98 | + |
| 99 | +# Launch in development mode |
| 100 | +npm run dev |
| 101 | +``` |
| 102 | + |
| 103 | +### Build for Production |
| 104 | + |
| 105 | +```bash |
| 106 | +# Build a macOS .zip (universal: x64 + arm64) |
| 107 | +npm run build:mac |
| 108 | +``` |
| 109 | + |
| 110 | +The output will be in the `dist/` directory. |
| 111 | + |
| 112 | +--- |
| 113 | + |
| 114 | +## Releases |
| 115 | + |
| 116 | +Releases are automated via GitHub Actions. Push a version tag to trigger a build: |
| 117 | + |
| 118 | +```bash |
| 119 | +git tag v1.0.0 |
| 120 | +git push origin v1.0.0 |
| 121 | +``` |
| 122 | + |
| 123 | +A macOS `.zip` artifact will be uploaded to the [GitHub Release](../../releases) automatically. |
| 124 | + |
| 125 | +--- |
| 126 | + |
| 127 | +## Project Structure |
| 128 | + |
| 129 | +``` |
| 130 | +src/ |
| 131 | +├── main/ # Electron main process |
| 132 | +│ ├── index.ts # App lifecycle, window, menu |
| 133 | +│ ├── db.ts # SQLite schema & CRUD |
| 134 | +│ ├── simulator.ts # xcrun simctl wrapper |
| 135 | +│ ├── scheduler.ts # Cron job management |
| 136 | +│ └── ipc-handlers.ts # IPC bridge registration |
| 137 | +├── preload/ # Context bridge |
| 138 | +│ ├── index.ts # API exposed to renderer |
| 139 | +│ └── index.d.ts # TypeScript declarations |
| 140 | +└── renderer/ # React frontend |
| 141 | + └── src/ |
| 142 | + ├── App.tsx # 3-panel layout + drag & drop |
| 143 | + ├── components/ # FolderList, NotificationList, NotificationForm, ScheduleDialog |
| 144 | + ├── hooks/ # useData (folders, notifications, simulators, schedules) |
| 145 | + └── lib/ # APNS payload builder, utils |
| 146 | +``` |
| 147 | + |
| 148 | +--- |
| 149 | + |
| 150 | +## License |
| 151 | + |
| 152 | +MIT |
0 commit comments