Bug 5837 - NSUserDefaults and NSUbiquitousKeyValueStore bind dictionaryRepresentation differently
Summary: NSUserDefaults and NSUbiquitousKeyValueStore bind dictionaryRepresentation di...
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.2
Hardware: Macintosh Mac OS
: --- enhancement
Target Milestone: old unified preview
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2012-06-24 10:44 UTC by Neal
Modified: 2014-11-05 02:47 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED FIXED

Description Neal 2012-06-24 10:44:50 UTC
Hello,

I see "AsDictionary" which may be from System.Collections.Generic but the NSDictionary should have a method DictionaryRepresentation which I'm not finding for NSUserDefaults.StandardUserDefaults.  It is available on NSUbiquitousKeyValueStore.DefaultStore so I'm wondering if this was missed in NSUserDefaults?
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-06-25 04:58:09 UTC
NSUserDefaults.AsDictionary is bound to dictionaryRepresentation, so that's the method you're looking for.

That said, it's unfortunate that dictionaryRepresentation is bound to AsDictionary for NSUserDefaults and DictionaryRepresentation for NSUbiquitousKeyValueStore.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2014-11-05 02:47:25 UTC
Fixed (for the Unified API).

We're now using 'ToDictionary' exclusively.

monotouch/master: 742112a9847db45e6a4b9ab1a04dd5a7def8d920
maccore/master: f29bd66426b692e1cc940e2f96342bda754afc0c
xamcore/master: e322e714b127793b77cad3ceae4721876d650091