AVAudioRecorder throws errors

为君一笑 提交于 2019-11-27 18:39:01

This error is just console noise from a System framework, you should ignore it, it doesn't affect you. If your app is crashing or failing to record the real reason is elsewhere.

AVAudioRecorder works just fine on iOS 5, even if it does throw (and catch) Exceptions during normal operations which make debugging harder.

I have also been experiencing these errors since moving to iOS5. I am not recording, but playing back sounds with AVAudioPlayer. This seems to be a problem with the AVAudio frameworks when using the iOS simulator only. Testing on actual hardware (an iPad 2 & iPad 1, in my case) does not produce these same errors, which makes me less concerned since testing on hardware is what I consider the testing that actually counts.

BTW, sorry that this is not an solution to fixing the issue, so much as a confirmation that you are not the only one experiencing the problem.

I have found that this error only comes up when using the Simulator. When it is tested on an actual device it works fine and no errors come up.

So until Apple releases a bug fix for the Simulator, test your apps on devices.

If you want to leave your break points on all exceptions in (which I find very useful), you can just use an if(!TARGET_IPHONE_SIMULATOR) statement before running audio. This will cause audio to only run if you're using a device.

There won't be any sound from the simulator, but it's very helpful if you don't need music on and want to debug other code.

I solved this problem by deleting exceptional breakpoints.

It's not an error. It's only an expectation of breakpoint. This issue is occurring if you have add "expectation breakpoints" in your XCode. Main suggestion is - do not you "expectation breakpoints" in Cocos2d projects.

Tinyfool

Just use a real device to test you code, and wait for the next update. I think that is your best choice.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!