Refactor lifecycle vars

This commit is contained in:
Marc Rousavy
2021-03-26 16:28:08 +01:00
parent 501827cb87
commit b25cf6a04f
6 changed files with 196 additions and 201 deletions

View File

@@ -6,8 +6,8 @@
// Copyright © 2021 Facebook. All rights reserved.
//
import Foundation
import AVFoundation
import Foundation
extension AVAudioSession {
/**
@@ -16,7 +16,7 @@ extension AVAudioSession {
func trySetAllowHaptics(_ allowHaptics: Bool) {
if #available(iOS 13.0, *) {
if !self.allowHapticsAndSystemSoundsDuringRecording {
try? self.setAllowHapticsAndSystemSoundsDuringRecording(true)
try? self.setAllowHapticsAndSystemSoundsDuringRecording(allowHaptics)
}
}
}