iOS Simulator does not play sound

前端 未结 3 549
傲寒
傲寒 2021-01-20 20:53

On XCode 6, everything works well on device, but on simulator, sound is not played.

There is my swift code :

var url =  NSURL(string: \"http://my.ur         


        
3条回答
  •  醉酒成梦
    2021-01-20 21:48

    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.

提交回复
热议问题