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

public class AKMicrophoneRecorder {
    
    private var internalRecorder: AVAudioRecorder
    private var recordingSession: AVAudioSession
    
    /// Initialize the recorder
    ///

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