他们说“当用户选择运行iOS 6.0的iPhone 4和iPad(第3代)主菜单上的最后一个按钮时,应用程序崩溃。”
当然我测试了,但一切都还好。 以下代码有错误吗?
NSDictionary *soundSetting;
soundSetting = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithFloat: 44100.0],AVSampleRateKey,
[NSNumber numberWithInt: kAudioFormatMPEG4AAC],AVFormatIDKey,
[NSNumber numberWithInt: 2],AVNumberOfChannelsKey,
[NSNumber numberWithInt: AVAudioQualityHigh],
AVEncoderAudioQualityKey,nil];
NSString *docDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES)objectAtIndex: 0];
//Spades
soundFileURLSpades = [NSURL fileURLWithPath:[docDir
stringByAppendingString: @"soundSpades.caf"]];
self.audioRecorderSpades = [[AVAudioRecorder alloc]
initWithURL: soundFileURLSpades
settings: soundSetting
error: nil];