Problem z biblioteką zasobów w systemie iOS - 5

Używam biblioteki zasobów do pobierania obrazu z adresu URL, mój kod to

ALAssetsLibraryAssetForURLResultBlock resultblock = ^(ALAsset *myasset){     
    ALAssetRepresentation *rep = [myasset defaultRepresentation];
    CGImageRef iref = [rep fullResolutionImage];
    UIImage *largeimage;

    if (iref) {
        largeimage = [UIImage imageWithCGImage:iref];
    }

    [self customeButtonCreated:self];

    NSData* thumbImageData = [[NSData alloc] initWithContentsOfFile:imagePath];
    btn1.frame = CGRectMake(x, y, WIDTH, HEIGHT);
    [btn1 setTag:tag];

    //[media_id addObject:[allKey objectAtIndex:0]];     
    [btnURl addObject:imagePath];

    UIImage *tempImage = [[UIImage alloc]initWithData:thumbImageData];
    [btn1 setImage:largeimage forState:UIControlStateNormal];
    btn1.imageView.contentMode = UIViewContentModeScaleAspectFit;           
    [tempImage release];

    [newView addSubview:btn1];
    [btn1 addTarget:self action:@selector(btnClicked:) forControlEvents:UIControlEventTouchUpInside];
    [thumbImageData release];

    imgcount++;

    NSLog(@"Iamge count ---%d",imgcount);
    tag++;
};

ALAssetsLibraryAccessFailureBlock failureblock  = ^(NSError *myerror){
    NSLog(@"Cannot get image - %@",[myerror localizedDescription]);
};


if ([seprateArr count] == 2) {
    NSURL *url=[NSURL URLWithString:[NSString stringWithFormat:@"assets-library://asset/asset.JPG?id=%@&ext=%@",[seprateArr objectAtIndex:0],[seprateArr objectAtIndex:1]]];
    ALAssetsLibrary* assetslibrary = [[[ALAssetsLibrary alloc] init] autorelease];
    [assetslibrary assetForURL:url resultBlock:resultblock failureBlock:failureblock];
}

działa poprawnie w ios - 4 lub poniżej, ale w ios - 5 nie wpisuje się w bloku i wyświetla błąd

Nie można uzyskać obrazu - Globalny odmówiono dostępu

jakieś rozwiązanie?

questionAnswers(1)

yourAnswerToTheQuestion