WatchKit app losing data after going background - Swift
问题 I'm passing a dictionary from my iPhone to the watch using the (watchOS 2) applicationContext method. Inside the iPhone app: func giveMeInfo(){ var lastStringUsed = porkee288.storyPoints.last! do { let resultDict = ["dict": myDict] try WCSession.defaultSession().updateApplicationContext(resultDict) } catch { print("Something wrong happened") } } Inside the watch app: func session(session: WCSession, didReceiveApplicationContext applicationContext: [String : AnyObject]) { dispatch_async