 
     override init() {
         super.init()
-
-        NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("applicationDidEnterBackground:"), name: UIApplicationDidEnterBackgroundNotification, object: nil)
-        NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("applicationWillEnterForeground:"), name: UIApplicationWillEnterForegroundNotification, object: nil)
+        #if os(iOS)
+            NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("applicationDidEnterBackground:"), name: UIApplicationDidEnterBackgroundNotification, object: nil)
+            NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("applicationWillEnterForeground:"), name: UIApplicationWillEnterForegroundNotification, object: nil)
+        #endif
     }
 
 

        fetch()
    }


    func applicationWillEnterForeground( application: UIApplication) -> Void {
        startUpdating()
    }

//

import Foundation
import WatchConnectivity
import CoreData

#if os(iOS)
    public typealias WindManagerResult = UIBackgroundFetchResult
    #else
    public typealias WindManagerResult = Void
#endif


@objc(WindManager)
public class WindManager : NSObject {
