Bug 2354 - NSFileManager.GetUrlForUbiquityContainer throws ArgumentNullException
Summary: NSFileManager.GetUrlForUbiquityContainer throws ArgumentNullException
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
Depends on:
Reported: 2011-12-05 22:07 UTC by rumination.xamarin
Modified: 2011-12-06 09:02 UTC (History)
3 users (show)

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:

Description rumination.xamarin 2011-12-05 22:07:58 UTC
ArgumentNullException is thrown when you try to supply null as the "containerID" argument:

var cloudURL = NSFileManager.DefaultManager.GetUrlForUbiquityContainer(null);

NSFileManager documentation:
"If you specify nil, this method returns the first container listed in the com.apple.developer.ubiquity-container-identifiers entitlement."
Comment 1 Duncan Mak 2011-12-05 22:28:49 UTC
Fixed - see commit d5bd911 in maccore.

Assigning to Sebastien so that he would add a test case.
Comment 2 Sebastien Pouliot 2011-12-06 09:02:47 UTC
backported to 'ios5' branch for future 5.0.x releases
tested/added test on 'master'