1
我只是試圖滿足以下功能的參數來調出錄音機。我相信問題在於完成塊。在調試中給出的錯誤是:Watchkit presentAudioRecordingControllerWithOutputURL完成塊問題
presentAudioRecordingControllerWithOutputURL:預設:maximumDuration:actionTitle:完成:要求非NULL URL和完成塊
NSBundle* myBundle = [NSBundle mainBundle];
NSURL* recording = [myBundle URLForResource:@"recording" withExtension:@"mp4"];
[self presentAudioRecordingControllerWithOutputURL:recording
preset:WKAudioRecordingPresetWideBandSpeech
maximumDuration:5000
actionTitle:@"Recording"
completion:^(BOOL didSave, NSError *error) {
if (error != nil)
{
NSLog(@"Error: %@",error);
}
else if(didSave == YES)
{
NSLog(@"Saved the recording");
}
}];
謝謝,改變記錄文件,以文件工作的位置! –