title: Thread 1: EXC_BAD_ACCESS (code=1, address=0x9) when trying to run my app on a physical device
body: <p>I'm trying to run an app on a physical device, but I have a </p>
  
  <blockquote>
    <p>"Thread 1: EXC_BAD_ACCESS (code=1, address=0x9)" </p>
  </blockquote>
  
  <p>in the <code>AppDelegate.Swift</code> file.</p>
  
  <p>I'm having trouble fixing the issue, even finding its origin.</p>
  
  <p>I'm using Xcode11 beta 5. The app uses SwiftUI.</p>
  
  <p>I turned on the <code>Zombie Object</code> under the <code>Diagnostic</code> tab when running the app.</p>
  
  <pre><code>import UIKit
  
  @UIApplicationMain
  class AppDelegate: UIResponder, UIApplicationDelegate { // Can't pass this line
  
      func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions:  [UIApplication.LaunchOptionsKey: Any]?) -&gt; Bool {
          return true
      }
  
      // MARK: UISceneSession Lifecycle
  
      func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -&gt; UISceneConfiguration {
          return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
      }
  
      func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set&lt;UISceneSession&gt;) {
      }
  
  }
  </code></pre>
  
  <p>Let me know if something else would help.</p>
  
  <p>Also I'm a beginner.</p>
  
  <p>Thanks!</p>