When I set:
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayAndRecord error:NULL];
…recording and playing works
Also,need to add AudioToolbox and AVFoundation frameworks to your project by Right-Cliking on Frameworks -> Add -> Existing Frameworks.
Otherwise might get linker error:"_AudioSessionSetProperty", referenced from: -[OpenBook startRecording] in OpenBook.o