iOS Simulator does not play sound

天大地大妈咪最大 提交于 2019-12-01 20:48:42

The error occurs because you are trying to get device's sample rate from simulator, which is not possible.

Because simulator is not a hardware. Its a software.

So some hardware functionality will not able to simulated with it.

It can not do the following:

  1. Open Camera
  2. Play sounds
  3. Gyrometer
  4. Accelerometer
  5. Shake effect
  6. Receive push notifications

And many more which required device hardware acceleration.

You need to test this in real device.

Francisco Corrales Morales

I was having this problem, the comment from @Matti Jokipii, helped me a lot.

You need to have a sound input enabled, so your Mac doesn't give you the null exception.
Go To System Preferences > Sound. And Check you have some input connected. If not, you will have to add a microfone, and re-rerun the app.

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