From e579702f8ad249accc617c9474ac104cbf01da37 Mon Sep 17 00:00:00 2001 From: Dan Kim Date: Sun, 22 Oct 2023 23:51:58 +0100 Subject: [PATCH] Vibrate on finish --- FlipTimer/View Models/TimerViewModel.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FlipTimer/View Models/TimerViewModel.swift b/FlipTimer/View Models/TimerViewModel.swift index 23f7e50..b9bca24 100644 --- a/FlipTimer/View Models/TimerViewModel.swift +++ b/FlipTimer/View Models/TimerViewModel.swift @@ -234,6 +234,9 @@ final class TimerViewModel: ObservableObject { audioPlayer = try! AVAudioPlayer(contentsOf: url) audioPlayer?.play() audioPlayer?.delegate = audioPlayerDelegate + + // Source: https://stackoverflow.com/a/33693071/2505156 + AudioServicesPlayAlertSound(kSystemSoundID_Vibrate) } }