Is it possible to record actual sound on the simulator using mic

故事扮演 提交于 2019-11-27 06:55:08

问题


Is it possible record the actual sound on the simulator using the mic.
I have created the recorder which record the sound in simulator but not recording the actual audio its just null(empty) audio.


回答1:


iOS Simulator does not support audio recording, you should use real device to test.

Here you can read about Limitations of Testing in iOS Simulator

Hardware Limitations While most of the functionality of iOS devices can be simulated in iOS Simulator, there are some hardware features that must be tested directly on a device. The hardware features that cannot be simulated are:

Accelerometer

Gyroscope
Camera
Proximity Sensor

Microphone Input




回答2:


The old answer for this question is now incorrect; the iOS Simulator now supports audio input/recording.

Pic below related: where you set your audio input device (defaults to your system default)

Also be warned, some online Apple dev docs still say audio input is unsupported by the simulator ("as of 8.2") even though it is with newer versions...

Edit: Screenshot from OS X 10.12 (Sierra), Xcode 9.1 (function is also available in later Xcode 8, > 8.2)



来源:https://stackoverflow.com/questions/20090128/is-it-possible-to-record-actual-sound-on-the-simulator-using-mic

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