Is there a way to get NSURL of all the images in iphone without using ALAsset

I am new to iphone - objC et al. I wanted to know if there is a way by which I could get all the NSURL and filename of the images files in an iphone without making use of ALAsset ?

In the current code - it is done like below. And I see the time it takes to loop 1100 images is like 14 seconds. Is there a better way to get url,filename quickly, please let me know.

    ALAssetsLibrary* assetLibrary = [[ALAssetsLibrary alloc] init];
    ALAssetsGroupType type = m == 2 || m == 1 ? ALAssetsGroupAll : ALAssetsGroupLibrary;

    [assetLibrary enumerateGroupsWithTypes:type usingBlock:^(ALAssetsGroup* group, BOOL* stop)
         if (group)
             [group setAssetsFilter:m == 1 ? [ALAssetsFilter allVideos] : [ALAssetsFilter allPhotos]];
             [group enumerateAssetsUsingBlock:^(ALAsset* asset, NSUInteger index, BOOL* innerstop)

                  if (asset)
                          if (!initialized)
                              *innerstop = YES;


                          ALAssetRepresentation* defaultRepresentation = [asset defaultRepresentation];

                              //NSLog(@"defaultRepresentation for %@", [[defaultRepresentation url] absoluteString]);
                              long long size        = [defaultRepresentation size];
                              NSURL*    url         = [defaultRepresentation url];
                              NSString* fileName    = [defaultRepresentation filename];


Need Your Help

mouseleave is triggering in IE7 while the cursor is still over the element

jquery internet-explorer events mouseleave

I'm using mouseleave to close a popup menu. This works correctly in all of my target browsers except IE7. In IE7, mouseleave triggers while the cursor is clearly still over the target element. I've

How to find out an extension's content type?

ruby-on-rails file-upload content-type paperclip

Where could I find out the content type for a specific file format/extension?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.