import Foundation
import AVFoundation
@available(iOS 14, *)
extension AVAudioSession {
class func set(category: AVAudioSession.Category = .playback) {
do {
try AVAudioSession.sharedInstance().setCategory(category)
} catch {
print("Audio session failed", error)
}
}
}
Even when I use the @available( attribution it doesn't work. How can I use the AVAudioSEssion in a swift package when the package could be used by Macos?
