diff --git a/ntfy-ios/App/AppDelegate.swift b/ntfy-ios/App/AppDelegate.swift index 8d9aa37..e80e7d8 100644 --- a/ntfy-ios/App/AppDelegate.swift +++ b/ntfy-ios/App/AppDelegate.swift @@ -15,10 +15,28 @@ class AppDelegate: NSObject, UIApplicationDelegate { didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil ) -> Bool { - // Gonfiure / setup Firebase - FirebaseApp.configure() - FirebaseConfiguration.shared.setLoggerLevel(.max) - - return true + // Gonfiure / setup Firebase + FirebaseApp.configure() + FirebaseConfiguration.shared.setLoggerLevel(.max) + return true + } +} + +extension AppDelegate: UNUserNotificationCenterDelegate { + func userNotificationCenter( + _ center: UNUserNotificationCenter, + willPresent notification: UNNotification, + withCompletionHandler completionHandler: + @escaping (UNNotificationPresentationOptions) -> Void + ) { + completionHandler([[.banner, .sound]]) + } + + func userNotificationCenter( + _ center: UNUserNotificationCenter, + didReceive response: UNNotificationResponse, + withCompletionHandler completionHandler: @escaping () -> Void + ) { + completionHandler() } } diff --git a/ntfy.sh.xcodeproj/project.pbxproj b/ntfy.sh.xcodeproj/project.pbxproj index 0b302a3..3bb50ca 100644 --- a/ntfy.sh.xcodeproj/project.pbxproj +++ b/ntfy.sh.xcodeproj/project.pbxproj @@ -24,7 +24,7 @@ 80386E862793585C009B0480 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 80386E9027935937009B0480 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 80386E9C27935EE9009B0480 /* ntfy-sh-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ntfy-sh-Info.plist"; sourceTree = ""; }; - 80386E9E27936087009B0480 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 80386E9E27936087009B0480 /* AppDelegate.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; tabWidth = 2; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */