title: How to terminate an app programmatically in iOS 12
body: <p>I have a problem I put my iPhone 6 on iOS 12 beta 1 and that's so a method in my application to close when press on a popup button doesn't works on iOS 12 but works on iOS 11.4.1</p>
  
  <p>That's the method that I used:</p>
  
  <pre><code>UIControl().sendAction(#selector(URLSessionTask.suspend), to: UIApplication.shared, for: nil)
  </code></pre>
  
  <p>In iOS 11 the app exit properly, in iOS 12 the app doesn't exit just do nothing when press on the popup button.</p>
  
  <p>I know that this is Swift 4.2 and when I rode the news and modifications I haven't seen something like a link with a new method to close app properly.</p>
  
  <p>I need that because I use that to close the app if the person doesn't accept Terms and conditions.</p>