AVAudioPlayer Error using iOS Simulator

I had this same problem, and was able to fix it by adjusting the sound settings on the mac I am running the simulator on, per the answer to this question. I was using an external sound card, and changing the audio settings on my mac in the following way did the trick:

  • Input: Internal Microphone
  • Output: Internal Speakers

Hope this helps. My code is very similar to yours, and I don't think this is a problem with your code at all.


Confirmed that attaching an audio input device (and restarting the computer) solves the problem. I got this error when shifting from a Macbook Air to a Mac Pro Cylinder after pulling the Git repo over.

I attached my Bose AE bluetooth headset and finally got a meaningful message from Xcode, but it was still aborting:

16:04:10.781 WARNING:   246: Default audio device changed. Restart the simulator to have it use the newly-selected device.
2015-04-21 16:04:19.790 FatBirdsPetAdventure[1622:84473] 16:04:19.790 ERROR:     56: Start: Mach message timeout. Apparently deadlocked. Aborting now.

After restarting the simulator and doing the XCode dance (delete app from simulator, clean project, rebuild) I got another message:

16:06:13.847 ERROR:     56: Initialize: Mach message timeout. Apparently deadlocked. Aborting now.

Finally after restarting the machine, there are no more errors.