title: swift check if device token has changed
body: <p>my swift 2 app works with push notifications.
  i save the deviceToken into a NSUserDefaults.</p>
  
  <pre><code>func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
              var deviceTokenString = String(deviceToken)
              deviceTokenString = String(deviceTokenString.characters.dropLast())
              deviceTokenString = String(deviceTokenString.characters.dropFirst())
              deviceTokenString = deviceTokenString.stringByReplacingOccurrencesOfString(" ", withString: "")
              defaults.setObject("\(deviceTokenString)", forKey: "DeviceToken")
      }
  </code></pre>
  
  <p>i would like to check (for example on each app start) if the device token has changed.</p>
  
  <p>where and how i can check this?
  should I register the device every time again to check, which token i receive and compare this with the token in the NSUserDefaults?</p>
  
  <p>or is there an better way?</p>