0
votes

I am using AVAudioRecorder for recording while I am recording I press home button and comes to fore ground and checked the status of the AVAudioRecorder (isRecording) is still YES. But when i play the audio it plays only what i recorded before goes to background.

Note: This problem comes only in ios7. It works well in ios6

1

1 Answers

1
votes

Have you set the app to allow background recording? Under the Project Capabilities, turn on Background Modes and select Audio and AirPlay.

Be warned, in iOS7, when background recording through AVAudioRecorder is interrupted, the recorded file is closed instead of paused. If a user get a phone call while recording in the background, the audio file will stop recording and cannot be resumed. You will need to start a new audio file and merge them, or use Audio Queues and manage the interruptions yourself.

See this answer for more info: Audio interruption when iOS application is recording in background