title: iOS: How to tell when an app is going to suspend?
body: <p>I want to know when my app is going to be suspend? The state of not being active for a certain amount of time or being terminated by the user. I need this because I need to close a connection a web socket. I want to keep the connection alive while the app is in the background state though.</p>
  
  <p>How do I do this?</p>
  
  <p>Thanks</p>