From 058511cb668a1373059a6d6829cb1cbf3b9ef577 Mon Sep 17 00:00:00 2001
From: Matthias Nott <mnott@mnsoft.org>
Date: Wed, 01 Apr 2026 12:56:14 +0200
Subject: [PATCH] fix: race configured hosts first, scan network only as fallback, 500ms probe timeout

---
 TODO-appstore.md |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/TODO-appstore.md b/TODO-appstore.md
index 252f1aa..9336863 100644
--- a/TODO-appstore.md
+++ b/TODO-appstore.md
@@ -38,6 +38,15 @@
 - [ ] **L6: Version number** — Default 1.0.0+1, set correctly before submission
 - [ ] **L7: App icon** — Verify meets Apple guidelines (no alpha channel, correct sizes)
 
+## APNs Push Notifications (implemented 2026-04-01)
+
+- [x] **APNs server side** — `src/apns/client.ts` in AIBroker: ApnsClient initialised from APNS_KEY_PATH/APNS_KEY_ID/APNS_TEAM_ID env vars, sandbox by default. Token storage in `~/.aibroker/apns-tokens.json`. `sendPush()` fires when `getMqttClientCount() == 0`.
+- [x] **APNs Flutter side** — `lib/services/push_service.dart`: `push` package (3.3.3, no Firebase). Requests permission on app start, publishes token to `pailot/device/token` MQTT topic. Re-registers on reconnect.
+- [x] **Entitlements** — `ios/Runner/Runner.entitlements` with `aps-environment=development`. All three build configs have `CODE_SIGN_ENTITLEMENTS` set.
+- [x] **UIBackgroundModes** — `remote-notification` added to Info.plist.
+- [x] **AppDelegate** — forwards UNUserNotificationCenter delegate methods to push plugin.
+- [ ] **Provisioning profile** — APNs requires an explicit provisioning profile from Apple Developer portal that includes Push Notifications capability. Must update in Xcode before deployment. Switch `aps-environment` to `production` in entitlements for App Store builds.
+
 ## App Store Requirements
 
 | Requirement | Status | Action |
@@ -49,6 +58,9 @@
 | NSBonjourServices | PASS | Fixed - removed _http._tcp |
 | NSAppTransportSecurity | PASS | Fixed - removed NSAllowsArbitraryLoads |
 | UIBackgroundModes: audio | PASS | - |
+| UIBackgroundModes: remote-notification | PASS | Added 2026-04-01 |
+| Push Notifications entitlement | PASS | Added Runner.entitlements 2026-04-01 |
+| APNs provisioning profile | FAIL | Must update in Xcode / Developer Portal |
 | Privacy Policy | FAIL | Fix L2 |
 | PrivacyInfo.xcprivacy | FAIL | Fix L1 |
 | TLS for network | PASS | Fixed C2 - self-signed cert, onBadCertificate=true |

--
Gitblit v1.3.1