I am having issues with UISaveVideoAtPathToSavedPhotosAlbum. I am running a social media site that allows users to post videos and other users are able to save the videos to their Photos Album by clicking a button. Here is my code:
if (buttonIndex == 0)
{
NSString *movieURL = self.postInfo.referenceText;
if (self.postInfo.type == SBPostTypeVideo)
{
if (UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(movieURL)){
UISaveVideoAtPathToSavedPhotosAlbum(movieURL, nil, nil, nil);
}
}
}
This code fails, however, with the following output:
Video http://VIDEOURL.COM/14.mov cannot be saved to the saved photos album: Error Domain=NSOSStatusErrorDomain Code=2 "This movie could not be played." UserInfo=0x9c2a400 {NSLocalizedDescription=This movie could not be played.}
The link is the correct path to the video. I believe the issue may be because it is attempting to save the original video URL to the camera, which is too big of a file size, though I am not positive. Any help either compressing it for download or anything else to get this to work would be much appreciated. Thanks so much!