         }, onError: { observer.on(.error($0)) })
         return observer
     }
+    #endif
 }

//  Copyright © 2017 Compass. All rights reserved.

import UIKit

extension URLSession {
    public enum ErrorType: LocalizedError {

        return observer
    }

    #if os(iOS) || os(tvOS)
    public func image(request: URLRequest) -> Observable<(UIImage, URLResponse)> {
        let observer = Replay<(UIImage, URLResponse)>(1)
        data(request: request).subscribe(queue: .main, onNext: { data, response in
