Instantiate user defaults on each use to see if it helps the hanging issue
This commit is contained in:
parent
51373885b4
commit
6ae36303de
|
@ -10,12 +10,15 @@ import UIKit
|
|||
|
||||
struct AppDefaults {
|
||||
|
||||
static var shared: UserDefaults = {
|
||||
private static var suiteName: String = {
|
||||
let appIdentifierPrefix = Bundle.main.object(forInfoDictionaryKey: "AppIdentifierPrefix") as! String
|
||||
let suiteName = "\(appIdentifierPrefix)group.\(Bundle.main.bundleIdentifier!)"
|
||||
return UserDefaults.init(suiteName: suiteName)!
|
||||
return "\(appIdentifierPrefix)group.\(Bundle.main.bundleIdentifier!)"
|
||||
}()
|
||||
|
||||
static var shared: UserDefaults {
|
||||
return UserDefaults.init(suiteName: suiteName)!
|
||||
}
|
||||
|
||||
struct Key {
|
||||
static let lastImageCacheFlushDate = "lastImageCacheFlushDate"
|
||||
static let firstRunDate = "firstRunDate"
|
||||
|
|
Loading…
Reference in New Issue