         return true
     }
 
-    
+
+    // MARK: - WC Session
+
+
+    func sessionWatchStateDidChange(session: WCSession) {
+        DLOG("Session: \(session)")
+    }
+
+    func sessionReachabilityDidChange(session: WCSession) {
+        DLOG("Session: \(session)")
+    }
+
+    func session(session: WCSession, didReceiveMessage message: [String : AnyObject], replyHandler: ([String : AnyObject]) -> Void) {
+        DLOG("Session: \(message)")
+        replyHandler(["result": "not_updated"])
+    }
+
+
     // MARK: - NSUserActivity
 
+    override func updateUserActivityState(activity: NSUserActivity) {
+        DLOG("\(activity)")
+    }
+
     func application(application: UIApplication, willContinueUserActivityWithType userActivityType: String) -> Bool {
         return true
     }
 
 
     func application(application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -> Void) -> Bool {
-        DLOG("Activity: \(userActivity.userInfo)")
-
-        if let userInfo = userActivity.userInfo {
-            if let urlString = userInfo["urlToActivate"] as? String {
-                let url = NSURL(string: urlString)
-                let success = openLaunchOptionsURL(url!)
-                return success
-            }
-        }
+        DLOG("Activity: \(userActivity.activityType) - \(userActivity.userInfo)")
+
+
+        if userActivity.activityType == CSSearchableItemActionType, let userInfo = userActivity.userInfo, let urlString = userInfo[CSSearchableItemActivityIdentifier] as? String {
+            DLOG("URL STRING: \(urlString)")
+            let url = NSURL(string: urlString)
+            let success = openLaunchOptionsURL(url!)
+
+            return success
+        } else if let userInfo = userActivity.userInfo, let urlString = userInfo["urlToActivate"] as? String {
+            let url = NSURL(string: urlString)
+            let success = openLaunchOptionsURL(url!)
+
+            return success
+        }
+
         return false
     }
 

            AppConfig.sharedConfiguration.applicationUserDefaults.synchronize()
        }

        Datamanager.sharedManager().cleanupPlots { () -> Void in
            WindManager.sharedManager.refreshInterval = 60
            WindManager.sharedManager.startUpdating()
        }

        application.setMinimumBackgroundFetchInterval(UIApplicationBackgroundFetchIntervalMinimum)



import UIKit
import VindsidenKit
import WatchConnectivity
import CoreSpotlight


@UIApplicationMain
class RHCAppDelegate: UIResponder, UIApplicationDelegate, WCSessionDelegate {

    var window: UIWindow?
    var connectionSession: WCSession?

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

        self.window?.tintColor = UIColor.vindsidenGloablTintColor()

