title: "'shared' is unavailable: Use view controller based solutions where appropriate instead" on App Extension
body: <p>I have a class that makes a network call. I want to be able to use this class in both the main app and App Extension. However, in this class I use: <code>UIApplication.shared.isNetworkActivityIndicatorVisible</code>.</p>
  
  <p>Since <code>shared</code> isn't available in App Extensions, is there a way that I can use something along the lines of <code>#available</code> such that I don't have to duplicate this class just because of that one line of code? (I could just remove the activity indicator but I rather not since I like to let users know when network calls are happening)</p>
  
  <p>I've tried adding a pre-compiled Macro as suggested by an answer I found on another question, but the compile still complains.</p>