Swift - How to set initial value for NSUserDefaults : <p>I have a switch called soundSwitch, I am saving the state of the button using an user default as such:</p>

<pre><code>@IBAction func soundsChanged(sender: AnyObject) {
        if soundSwitch.on{
            defaults.setBool(true, forKey: "SoundActive")
            print("Sound ON")
        }else{
            defaults.setBool(false, forKey: "SoundActive")
            print("Sound OFF")
        }
    }
</code></pre>

<p>Currently the actual defaults value is initially false when the user first launches the application. </p>

<p>How do I implement the defaults to be true if the user is first launching the app and it they haven't been configured yet.</p>

<p>I have seen methods in Objective-C, but nothing in Swift. From what I have seen you can do it in the app delegate some how, or in a plist file. How do I do either of those ones?</p>
