feat: Add iOS push notification support (iOS 16.4+)

- Platform detection utilities (is_ios, is_standalone, supports_push)
- iOS-specific meta tags and Apple touch icons
- Auto-detect iOS and show user-friendly message when not in standalone mode
- Enhanced Service Worker with iOS-compatible notification options
- Comprehensive iOS push notification documentation
- manifest.json scope for PWA compliance
- Only works when added to Home Screen (iOS Safari limitation)
This commit is contained in:
spinline
2026-02-05 23:57:08 +03:00
parent 373da566be
commit bffc72391a
7 changed files with 217 additions and 0 deletions

View File

@@ -110,6 +110,13 @@ self.addEventListener('push', (event) => {
badge: data.badge || '/icon-192.png',
tag: data.tag || 'vibetorrent-notification',
requireInteraction: false,
// iOS-specific: vibrate pattern (if supported)
vibrate: [200, 100, 200],
// Add data for notification click handling
data: {
url: data.url || '/',
timestamp: Date.now()
}
};
console.log('[Service Worker] Showing notification:', title, options);