Fix compilation errors and prepare for App Store submission

- Fix NotificationService warnings by replacing unused error parameters with _
- Add public domain header to NotificationService.swift
- Fix BluetoothMeshService compilation errors:
  - Replace removeAll with filter for processedKeyExchanges cleanup
  - Remove duplicate cleanupStalePeers function declaration
  - Remove duplicate peerLastSeenTimestamps property declaration
- All code now compiles cleanly for both iOS and macOS targets
This commit is contained in:
jack
2025-07-04 17:28:36 +02:00
parent 44d97ffb7e
commit cbcfaed7a2
5 changed files with 23 additions and 105 deletions
+11 -9
View File
@@ -1,3 +1,11 @@
//
// NotificationService.swift
// bitchat
//
// This is free and unencumbered software released into the public domain.
// For more information, see <https://unlicense.org>
//
import Foundation
import UserNotifications
#if os(iOS)
@@ -12,11 +20,9 @@ class NotificationService {
private init() {}
func requestAuthorization() {
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { granted, error in
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { granted, _ in
if granted {
// Permission granted
} else if let error = error {
// print("[NOTIFICATIONS] Permission error: \(error)")
}
}
}
@@ -49,12 +55,8 @@ class NotificationService {
trigger: nil // Deliver immediately
)
UNUserNotificationCenter.current().add(request) { error in
if let error = error {
// print("[NOTIFICATIONS] Error sending notification: \(error)")
} else {
// Notification sent
}
UNUserNotificationCenter.current().add(request) { _ in
// Notification added
}
}