title: Tell background state of action extension
body: <p><code>UIApplication</code> has the handy <code>applicationState</code> property that allows you to see if your application is in the background or not. In action (and share) extensions, use of <code>UIApplication</code> is illegal, and even if you <em>do</em> get an instance of it within an extension it always reports <code>applicationState=UIApplicationStateBackground</code>. I also tried observing <code>UIApplicationDidEnterBackgroundNotification</code>, it never fires.</p>
  
  <p>Is there a way to effectively tell if an extension is running within an app that's in the foreground or background?</p>