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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user