saving the videos and photos in iPhone Simultor 4.0
- by Mohammed Sadiq
Hi All,
From 4.0 apple has extended their api support to access the videos and photos from the phone. I am using only iPhone 4.0 simulator to test my application. When I try to save the video as apple has mentioned in their api docs, its giving the error something like "Error Saving the Asset". The way I try to store the video is as follows :
ALAssetsLibraryWriteVideoCompletionBlock _videoCompblock = ^(NSURL *assetURL, NSError *error){
if(assetURL)
{
NSLog(@"Video AssetUrl : %@", [assetURL absoluteString]);
}
else if(error)
{
NSLog(@"The Error occured : %@", [error localizedDescription]);
}
};
BOOL isSupported = [library deoAtPathIsCompatibleWithSavedPhotosAlbum:videoFileUrl];
if(isSupported)
{
[library writeVideoAtPathToSavedPhotosAlbum:videoFileUrl completionBlock:_videoCompblock];
}
The above methods should print the url of the video on successful saving of the video file. But its printing the error message as "ERROR SAVING THE ASSET".
Any idea or help on this topic will be greatly appreciated.
Best Regards,
Mohammed Sadiq.