The resource library is not working correctly 4.0 and 4.2

I tried to implement an asset library and create a custom image picker. In particular, I am trying to run the code given here: http://icodeblog.com/2010/10/07/cloning-uiimagepickercontroller-using-the-assets-library-framework/

The code works fine in Simulator 4.1, but when I try 4.0 or 4.2, it gets stuck on the "Download" screen and it gives me the following comment on GDB:

2010-11-16 16: 37: 27.514 ELCImagePickerDemo [49819: 6b03] PROBLEM DONE

This is from this line in code:

ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; 
[library enumerateGroupsWithTypes:ALAssetsGroupAll usingBlock:assetGroupEnumerator failureBlock:^(NSError *error) 
{ 
    NSLog(@"A problem occured"); 
}]; 

Somehow I can’t understand what the problem is. I added the Asset Lib structure and that’s it.

0
source share
2

, !

, , : https://devforums.apple.com/message/323036#323036

assetGroupEnumerator , dispatch_async (dispatch_get_main_queue(), !!!

+1

, , .

:

NSLog(@"A problem occured");

:

NSLog(@"A problem occured: %@", error);
0

Source: https://habr.com/ru/post/1779241/


All Articles