Bug 1844 - ALAssetsLibrary.Enumerate finds only a single ALAssetGroup
Summary: ALAssetsLibrary.Enumerate finds only a single ALAssetGroup
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-11-02 18:56 UTC by cml2
Modified: 2011-11-03 09:13 UTC (History)
2 users (show)

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

small test project (6.46 KB, application/zip)
2011-11-02 18:56 UTC, cml2

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 cml2 2011-11-02 18:56:53 UTC
Created attachment 812 [details]
small test project

ALAssetsLibrary.Enumerate does not really enumerate the groups. It just returns the first instance of ALAssetGroup where type=Event, then it stops.
This happens on ios5.x + MT 5.x.
With ios4.x and MT 4.x it was working properly.

Small test project is attached to illustrate this. But it can be run on iPhone only (with the groups defined) as there is no chance to modify ALAssetGroups with code (as far as I know)
Comment 1 Sebastien Pouliot 2011-11-02 20:51:32 UTC
Using your code I only get one printed on the console.

However if I set 'stop' to false inside your GalleryEnumeration then they are all printed. I suspect this default value changed if your code was working on earlier iOS releases. Can you confirm this works on your device ?

note: This can be tested on the iOS simulator by adding one image [1] then going to the photo app and adding a new album (Edit | Add).

[1] http://stackoverflow.com/q/468879/220643
Comment 2 cml2 2011-11-03 09:13:30 UTC
Works perfectly, thank you.