We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5156f4 commit a404332Copy full SHA for a404332
Sources/Swift/Display Receipt/DisplayReceiptCacheHelper.swift
@@ -43,7 +43,9 @@ internal struct DisplayReceiptCacheHelper {
43
44
static func sharedDefaults() throws -> UserDefaults {
45
let groupId = try self.sharedGroupId()
46
- return UserDefaults.init(suiteName: groupId)!
+ guard let defaults = UserDefaults.init(suiteName: groupId)
47
+ else { throw DisplayReceiptHelperError.appGroupError }
48
+ return defaults
49
}
50
51
// MARK: Methods updating cache files
0 commit comments