Moves the sound resource into the Shared Resources folder.

Moves the audio filename reference into the AppAssets struct to make it less stringly typed and centralise access.
This commit is contained in:
Diggory Laycock
2022-10-01 15:17:22 +01:00
parent 71275813da
commit 1ed547d722
5 changed files with 11 additions and 2 deletions

View File

@@ -295,4 +295,9 @@ struct AppAssets {
}
}
static var notificationSoundBlipFileName: String = {
return "notificationSoundBlip.caf"
}()
}

View File

@@ -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 */,

View File

@@ -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) {

View File

@@ -325,4 +325,8 @@ struct AppAssets {
}
}
static var notificationSoundBlipFileName: String = {
return "notificationSoundBlip.caf"
}()
}