Getting "guard body may not fall through" error when setting up Google Analytics on iOS Project (in Swift) : <p>I am getting the following error when trying to archive my build on XCode:</p>

<blockquote>
  <p>/Users/AppDelegate.swift:18:9: 'guard' body may not fall through,
  consider using 'return' or 'break' to exit the scope</p>
</blockquote>

<p>It is a little frustrating, because it is the exact code that Google Analytics (I just copied/pasted) suggests you to put in appdelegate to set-up their analytics. Also, it only occurs when archiving my build. It does not occur when just running my code in the simulator.</p>

<p>Would appreciate if anyone had some ideas.</p>

<p><em>EDIT: I also tried placing a break or continue after the assert, but I got an error...Something about it not being a loop.</em></p>

<pre><code>import UIKit
import Firebase

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -&gt; Bool {

        FIRApp.configure()

        //Google Analytics
        guard let gai = GAI.sharedInstance() else {
            assert(false, "Google Analytics not configured correctly")
        }
        gai.tracker(withTrackingId: "xxxxxxxxxxx")
        // Optional: automatically report uncaught exceptions.
        gai.trackUncaughtExceptions = true

        // Optional: set Logger to VERBOSE for debug information.
        // Remove before app release.
        gai.logger.logLevel = .verbose;


        return true
    }
</code></pre>
