title: How do you unregister for VOIP push notifications with Twilio Swift SDK
body: <p>I'm using the Twilio iOS Swift Callkit starter code and have successfully got an app + server and running dispensing access tokens, calls being made and received via VOIP push notification.</p>
  
  <p>Now I want to be able to let the user log out. How do I unregister for VOIP push notifications.</p>
  
  <p>I can see that there is this function in my code which looks like the thing to do it, but it looks like something that gets called by something else rather than directly.</p>
  
  <pre><code>func pushRegistry(_ registry: PKPushRegistry, didInvalidatePushTokenForType type: PKPushType) {
      NSLog("pushRegistry:didInvalidatePushTokenForType:")
  
      if (type != .voIP) {
          return
      }
  
      guard let deviceToken = deviceTokenString, let accessToken = fetchAccessToken() else {
          return
      }
  
      VoiceClient.sharedInstance().unregister(withAccessToken: accessToken, deviceToken: deviceToken) { (error) in
          if (error != nil) {
              NSLog("An error occurred while unregistering: \(error?.localizedDescription)")
          }
          else {
              NSLog("Successfully unregistered from VoIP push notifications.")
          }
      }
  
      self.deviceTokenString = nil
  }
  </code></pre>
  
  <p>How do I cause it to be called?</p>
  
  <p>Thanks.</p>