Get app identifier from bundle rather than hard-coding it. It’s different for the MAS build.

This commit is contained in:
Brent Simmons 2018-12-11 21:49:04 -08:00
parent f11c4fc955
commit c84d8846ce
1 changed files with 2 additions and 1 deletions

View File

@ -140,7 +140,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
currentTheme = themeLoader.defaultTheme
let tempDirectory = NSTemporaryDirectory()
let cacheFolder = (tempDirectory as NSString).appendingPathComponent("com.ranchero.NetNewsWire-Evergreen")
let bundleIdentifier = (Bundle.main.infoDictionary!["CFBundleIdentifier"]! as! String)
let cacheFolder = (tempDirectory as NSString).appendingPathComponent(bundleIdentifier)
let faviconsFolder = (cacheFolder as NSString).appendingPathComponent("Favicons")
let faviconsFolderURL = URL(fileURLWithPath: faviconsFolder)