presentAudioRecordingControllerWithOutputURL在WatchKit项目中无法识别

时间:2015-06-14 10:30:18

标签: ios iphone audio watch-os watch-os-2

我有一个WatchKit的现有项目,并且在新的WatchOS版本中Apple已经实现了一个名为/path/myProject WatchKit Extension/AWMessagesController.m:278:56: 'WKAudioRecordingPresetWideBandSpeech' is unavailable: not available on iOS /path/myProject WatchKit Extension/AWMessagesController.m:277:11: 'presentAudioRecordingControllerWithOutputURL:preset:maximumDuration:actionTitle:completion:' is unavailable: not available on iOS 的方法来记录来自AppleWatch的音频。

当我调用此方法时,我有两个编译错误。我想我必须添加或包含更多内容,但我不知道在项目中我需要改变什么。

enter image description here

错误:

sbt assembly

1 个答案:

答案 0 :(得分:1)

presentAudioRecordingControllerWithOutputURL无法在iOS扩展程序中使用。您必须适当地迁移代码(例如,将文件复制到监视目标)。请参阅Apple's documentation