I browsed through all kinds of post related to this topic but the answers just do not really help. I used this tutorial to implement recording of audio files and playback. What
FYI -- The "[recorder prepareToRecord]" method creates a fresh audio file, overwriting any previous recorded file.
You need to stop recording in order to save the data to the file permanently:
[recorder stop];
The problem is that when you tell XCode (in the viewDidLoad method) to [recorder prepareToRecord]; it gets rid of the previously recorded audio file. Eliminate that piece of code in the "if" statement and your audio file WILL be saved when you exit and come back in to the app.