         } catch {
             print("lacking permission to record!\n")
         }
+        #endif
         
         let url = NSURL.fileURLWithPath(file, isDirectory: false)
         try! internalRecorder = AVAudioRecorder(URL: url, settings: settings)

    /// - parameter settings: File format settings (defaults to WAV)
    ///
    public init(_ file: String, settings: [String: AnyObject] = AudioKit.format.settings) {
        
        self.recordingSession = AVAudioSession.sharedInstance()
        do {
            try recordingSession.setCategory(AVAudioSessionCategoryPlayAndRecord, withOptions:AVAudioSessionCategoryOptions.DefaultToSpeaker)

public class AKMicrophoneRecorder {
    
    private var internalRecorder: AVAudioRecorder
    
#if os(iOS)
    private var recordingSession: AVAudioSession
#endif
    
    /// Initialize the recorder
    ///
