title: SwiftUI - How to get access to "WindowScene"
body: <p>In watching the WWDC 21 videos reference StoreKit 2, there are a few functions that they reference wherein they let a value = <code>WindowScene</code> as follows:</p>
  <pre class="lang-swift prettyprint-override"><code>func manageSubscriptions() async {
      if let windowScene = self.view.window?.windowScene {
          do {
              try await AppStore.showManageSubscriptions(in: windowScene)
          } catch {
              //error
          }
      }
  }
  </code></pre>
  <p>The let line errors out with the message: <code>Type of expression is ambiguous without more context</code></p>
  <p>If I try and provide more context with something like:</p>
  <pre class="lang-swift prettyprint-override"><code>if let windowScene = (self.view.window?.windowScene)! as UIWindowScene {
  </code></pre>
  <p>I am told: <code>Value of type 'MyStruct' has no member 'view'</code></p>
  <p>What am I missing, must be something simple, to gain access to this needed UI element?</p>
  <p>Thank you</p>
  <p><em><strong>Added:</strong></em>
  I'd like to add that I am using a SwiftUI app that was created using a SceneDelegate and AppDelegate, not a simple struct: App, type of structure. So I am guessing I need to access something in the SceneDelegate to get the right object..</p>