The following used to work in Swift 1.2:
var recordSettings = [
AVFormatIDKey: kAudioFormatMPEG4AAC,
AVEncoderAudioQualityKey : AVAudioQuality.Max.rawValue,
AVEncoderBitRateKey : 320000,
AVNumberOfChannelsKey: 2,
AVSampleRateKey : 44100.0]
Now, it gives the error:
"Type expression is ambiguous without more context".
You could give the compiler more information:
let recordSettings : [String : Any] =
[
AVFormatIDKey: kAudioFormatMPEG4AAC,
AVEncoderAudioQualityKey : AVAudioQuality.Max.rawValue,
AVEncoderBitRateKey : 320000,
AVNumberOfChannelsKey: 2,
AVSampleRateKey : 44100.0
]