     private var time: String? = "Invalid"
     var wcSession: WCSession?
     private var session: NSURLSession?
+    private var bgTaskID: UIBackgroundTaskIdentifier? = nil
     
     func startWCSession() {
         if (WCSession.isSupported() && wcSession == nil) {

        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
        UIApplication.sharedApplication().setKeepAliveTimeout(600) { () -> Void in
            NSLog("voip called...")
            self.fetchNewData()
        }
    }


    }
    
    func test(completionHandler: ((UIBackgroundFetchResult) -> Void)?) {
        sendLocalNotif("\(selectedCity()):尝试获取数据", badge: -1)
        let request = createRequest()
        if session == nil {
            session = sharedSessionForIOS()
