diff --git a/Mac/AppAssets.swift b/Mac/AppAssets.swift index 2e6103762..84f6b6f2a 100644 --- a/Mac/AppAssets.swift +++ b/Mac/AppAssets.swift @@ -295,4 +295,9 @@ struct AppAssets { } } + static var notificationSoundBlipFileName: String = { + return "notificationSoundBlip.caf" + }() + + } diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index 3b5ab6fd8..a8f4adbf3 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -1860,6 +1860,7 @@ 511D43CE231FA51100FB1562 /* Resources */ = { isa = PBXGroup; children = ( + DDE6A35028E8741F00612823 /* notificationSoundBlip.caf */, DFD6AACB27ADE80900463FAD /* NewsFax.nnwtheme */, 51DEE81126FB9233006DAA56 /* Appanoose.nnwtheme */, 51077C5727A86D16000C71DB /* Hyperlegible.nnwtheme */, @@ -2742,7 +2743,6 @@ 514219572353C28900E07E2C /* main_ios.js */, 17D7586C2679C21700B17787 /* NetNewsWire-iOS-Bridging-Header.h */, 84C9FC9B2262A1A900D921D6 /* Assets.xcassets */, - DDE6A35028E8741F00612823 /* notificationSoundBlip.caf */, 84C9FC9C2262A1A900D921D6 /* Info.plist */, 84BB0F812333426400DED65E /* NetNewsWire.entitlements */, 51F805ED24284C1C0022C792 /* NetNewsWire-dev.entitlements */, diff --git a/iOS/Resources/notificationSoundBlip.caf b/Shared/Resources/notificationSoundBlip.caf similarity index 100% rename from iOS/Resources/notificationSoundBlip.caf rename to Shared/Resources/notificationSoundBlip.caf diff --git a/Shared/UserNotifications/UserNotificationManager.swift b/Shared/UserNotifications/UserNotificationManager.swift index b44d6d40e..d2bbae1fe 100644 --- a/Shared/UserNotifications/UserNotificationManager.swift +++ b/Shared/UserNotifications/UserNotificationManager.swift @@ -63,7 +63,7 @@ private extension UserNotificationManager { content.body = ArticleStringFormatter.truncatedSummary(article) content.threadIdentifier = webFeed.webFeedID // https://freesound.org/people/cabled_mess/sounds/350862/ - content.sound = UNNotificationSound(named: UNNotificationSoundName(rawValue: "notificationSoundBlip.caf")) + content.sound = UNNotificationSound(named: UNNotificationSoundName(rawValue: AppAssets.notificationSoundBlipFileName)) content.userInfo = [UserInfoKey.articlePath: article.pathUserInfo] content.categoryIdentifier = "NEW_ARTICLE_NOTIFICATION_CATEGORY" if let attachment = thumbnailAttachment(for: article, webFeed: webFeed) { diff --git a/iOS/AppAssets.swift b/iOS/AppAssets.swift index 23e3a4d91..61889bce0 100644 --- a/iOS/AppAssets.swift +++ b/iOS/AppAssets.swift @@ -325,4 +325,8 @@ struct AppAssets { } } + static var notificationSoundBlipFileName: String = { + return "notificationSoundBlip.caf" + }() + }