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

        } catch {
            print("lacking permission to record!\n")
        }
        
        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) {

        #if os(iOS)
        self.recordingSession = AVAudioSession.sharedInstance()
        do {
            try recordingSession.setCategory(AVAudioSessionCategoryPlayAndRecord, withOptions:AVAudioSessionCategoryOptions.DefaultToSpeaker)
