@@ -29,7 +29,7 @@ import TimeVerification
2929
3030@available ( iOS17 . 0 , macOS14 . 0 , watchOS10 . 0 , * )
3131struct AppIntentProvider : AppIntentTimelineProvider {
32- private let defaults = UserDefaults . standard
32+ private let defaults = UserDefaults ( suiteName : " group.twofas.com " )
3333private let calendar = Calendar . current
3434typealias Intent = SelectService
3535
@@ -204,19 +204,18 @@ struct AppIntentProvider: AppIntentTimelineProvider {
204204@available ( iOS17 . 0 , macOS14 . 0 , watchOS10 . 0 , * )
205205extension AppIntentProvider {
206206private func clearDefaults( ) {
207- defaults. removeObject ( forKey: CommonKeys . tapDate)
208- defaults. removeObject ( forKey: CommonKeys . tapSecret)
209- defaults. synchronize ( )
207+ defaults? . removeObject ( forKey: CommonKeys . tapDate)
208+ defaults? . removeObject ( forKey: CommonKeys . tapSecret)
209+ defaults? . synchronize ( )
210210}
211211
212212private func handleClickableWidgets( ) -> ( validSecret: Secret ? , secondsLeft: Int ) {
213213let validSecret : Secret ?
214214let secondsLeft : Int
215215
216- let dateValue = defaults. double ( forKey: " tapDate " )
217- if !dateValue. isZero{
216+ if let dateValue= defaults? . double ( forKey: " tapDate " ) , !dateValue. isZero{
218217let duration = Date ( ) . timeIntervalSince1970- dateValue
219- if duration< 60.0 , let storedSecret= defaults. string ( forKey: " tapSecret " ) {
218+ if duration< 60.0 , let storedSecret= defaults? . string ( forKey: " tapSecret " ) {
220219 secondsLeft= 60 - Int( duration)
221220 validSecret= storedSecret
222221} else {