My audio app remains silent on my iPhone.

Hello, everybody!


I'm a beginner and I have just programmed an app, which should play an audio file. The app runs perfectly in the simulator in Xcode, but on my device there is absolutely no sound. I checked everything on my phone. It isn't mute and the volume is up. Another app, which I have programmed is a picture gallery. There is no problem with that. It's only the audioplayer app, that doen't run. How can I solve this? Thanks a lot for your help.

Replies

Maybe check your code to see if there is any bugs/errors?

Make sure the audio file name in the Finder is the same as the name you used in your code.


iOS is case sensitive. macOS isn't, which is why it doesn't matter in the simulator, but fails on iOS.


mYaudioFile.mp3 is not the same as myaudiofile.mp3


If you change your code, be sure to use Xcode's Product menu with the option-key pressed, then choose 'clean build folder'.


Good luck.

have you checked other music apps working correctly on your iPhone ?