I have a new Project from an older Member of our Team. I Don't know where the Problem is...
// Chooses the photo at the last index
[group enumerateAssetsAtIndexes:[NSIndexSet indexSetWithIndex:[group numberOfAssets] - 1] options:0 usingBlock:^(ALAsset *alAsset, NSUInteger index, BOOL *innerStop) {
// The end of the enumeration is signaled by asset == nil.
if (alAsset) {
ALAssetRepresentation *representation = [alAsset defaultRepresentation];
[defaults setObject:representation.filename forKey:@"latest"];
}
}];
} failureBlock: ^(NSError *error) {
// Typically you should handle an error more gracefully than this.
NSLog(@"No groups");
}];
2014-09-04 11:37:55.960 IMDropShare[28350:60b] WARNING: GoogleAnalytics 3.06 void GAIUncaughtExceptionHandler(NSException *) (GAIUncaughtExceptionHandler.m:49): Uncaught exception: indexSet count or lastIndex must not exceed -numberOfAssets 2014-09-04 11:38:00.980 IMDropShare[28350:60b] * Terminating app due to uncaught exception 'NSRangeException', reason: 'indexSet count or lastIndex must not exceed -numberOfAssets'