title: Passing data to Apple Watch app
body: <p>I am trying to pass data from my app into my Apple Watch app. Basically, I am using the same method as I used for creating the today widget and so I am passing data through NSUserDefaults.</p>
  
  <p>The problem is, that when I run my app, the data does not update the labels in the Watch app as I would expect it to.</p>
  
  <p>Here is what I have...</p>
  
  <pre><code>override init(context: AnyObject?) {
      // Initialize variables here.
      super.init(context: context)
  
      // Configure interface objects here.
      NSLog("%@ init", self)
  
      var defaults = NSUserDefaults(suiteName: "group.AffordIt")
      var totalBudgetCalculation = ""
      if (defaults!.stringForKey("totalBudgetWidget") != nil) {
              println("Worked")
          totalBudgetCalculation = defaults!.stringForKey("totalBudgetWidget")!
          initialBudgetLabel.setText("Initial: \(totalBudgetCalculation)")
      }
  
      var currentBudgetCalculation = ""
      if (defaults!.stringForKey("currentBudgetWidget") != nil) {
          currentBudgetCalculation = defaults!.stringForKey("currentBudgetWidget")!
          currentBudgetLabel.setText("Current: \(currentBudgetCalculation)")
      }
  }
  </code></pre>
  
  <p>I tried putting this code in <code>willActivate()</code>, however that doesn't seem to make a difference.</p>
  
  <p>Anyone know where I am going wrong?</p>