Save dictionary in userdefaults in swift 3 with xcode 8
<p>I am using the following code to save an object to UserDefaults (previously NSUserDefaults) using xcode 8:</p>

<pre><code>let defaults = UserDefaults.standard()
defaults.set(someObject, forKey: "someObject")
print(defaults.object(forKey: "someObject"))
</code></pre>

<p>someObject is a dictionary and I am running on the simulator. </p>

<p>For some reason this is not saving the value and 'nil' is printed.  Wondering if it's a simulator problem. </p>