Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
When you try to read a value from NSUserDefaults, the value is null (in Sandbox Mode). This has worked before, but stopped working with the current release. Here's some code:
var defaults = Foundation.NSUserDefaults.StandardUserDefaults;
var test = defaults.StringForKey("test");
The variable test is always null, but it should contain "test". This works only as expected when you disable Sandbox Mode.
Xamarin.Mac does not do anything different between running unrestricted or in a sandbox.
However there are common issues that could explain this, e.g. https://stackoverflow.com/q/22242106/220643
> This has worked before, but stopped working with the current release.
Can you provide more information, like the XM version you were using ?
A small project showing the exact code you are using, sandbox configuration, and such would also be useful.
As @Sebastien correctly noted, in this case Xamarin.Mac is a rather thin layer above the APIs in question.
This was probably a problem with running the app with debug and store provision profiles. After deleting ~/Library/Containers/"Bundle Identifier", everything worked again.
Sorry for the inconvenience
@Marko, thanks for updating us on the status. We're glad things are working again :)