|
@@ -140,12 +140,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
|
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { (_, _) in }
|
|
|
|
|
|
// Audio Session
|
|
|
- do {
|
|
|
- try AVAudioSession.sharedInstance().setCategory(.playAndRecord, mode: .default, options: [.mixWithOthers, .allowAirPlay])
|
|
|
- try AVAudioSession.sharedInstance().setActive(true)
|
|
|
- } catch {
|
|
|
- print(error)
|
|
|
- }
|
|
|
+ setAVAudioSession()
|
|
|
|
|
|
// Store review
|
|
|
if !NCUtility.shared.isSimulatorOrTestFlight() {
|
|
@@ -320,6 +315,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
|
//[fileProviderDomain registerDomains];
|
|
|
}
|
|
|
|
|
|
+ // MARK: - AVAudioSession
|
|
|
+
|
|
|
+ func setAVAudioSession() {
|
|
|
+ do {
|
|
|
+ try AVAudioSession.sharedInstance().overrideOutputAudioPort(AVAudioSession.PortOverride.none)
|
|
|
+ try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default, options: [.mixWithOthers, .allowAirPlay])
|
|
|
+ try AVAudioSession.sharedInstance().setActive(true)
|
|
|
+ } catch {
|
|
|
+ print(error)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// MARK: - Background Task
|
|
|
|
|
|
@available(iOS 13.0, *)
|