I’m trying to access photos in the iOS asset library that the user has taken using Burst Mode. I’m trying using ALAssetsLibrary and filtering photos:
- (void)findBurstModePhotos
{
ALAssetsFilter *allPhotos = [ALAssetsFilter allPhotos];
ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init];
[assetLibrary enumerateGroupsWithTypes:ALAssetsGroupAll
usingBlock:^(ALAssetsGroup *group,
BOOL *stop) {
[group setAssetsFilter:allPhotos];
NSLog(@"Group: %@",
[group valueForProperty:
ALAssetsGroupPropertyName]);
if ([group numberOfAssets] > 0) {
[self evaluateGroup:group];
}
}
failureBlock:^(NSError *error) {
NSLog(@"Failure enumerating groups: %@",
[error localizedDescription]);
}];
}
- (void)evaluateGroup:(ALAssetsGroup *)group
{
[group enumerateAssetsUsingBlock:^(ALAsset *result,
NSUInteger index,
BOOL *stop) {
NSLog(@"Photo date: %@", [result valueForProperty:ALAssetPropertyDate]);
}];
}
Unfortunately, this returns Burst Mode photos as a single photo. Is there a supported way to get Burst Mode photos individually? I’d like to get each photo from a single Burst Mode session.