I am trying to retrieve an image from the ALAssets library using a URL, calling assetforURL, but neither the result nor completion blocks are ever called. Something like this:
[library assetForURL:assetURL
resultBlock:^(ALAsset *myasset){
NSLog(@"asset found");
}
failureBlock:^(NSError *error){
NSLog(@"error");
}];
I know that assetforURL is asynchronous and that the blocks will be called sometime later. But they seem to be never called. I never see the output from the NSLog, and if I put in breakpoints, they are never reached.
What I'm really trying to do is associate images with items in a database. I store the asset URLs in the database, and then use the code above to retrieve them. Is there a different way of doing this? I havn't been able to find any examples of anything like this.
Thanks!