MP3 file format is popular but iOS can’t support for recording with MP3 file format. Here is a sample code using the lame which can convert pcm to mp3.
Application is a simple. First, recording. Then, play back wav or mp3. That’s it. A project files are here.