For iOS9, ALAssetsLibrary
is deprecated. So how to change it as PHPPhotoLibrary
instead of ALAssets
?
if (RecordedSucc
// Save to the album
__block PHObjectPlaceholder *placeholder;
[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
PHAssetChangeRequest* createAssetRequest = [PHAssetChangeRequest creationRequestForAssetFromVideoAtFileURL:outputFileURL];
placeholder = [createAssetRequest placeholderForCreatedAsset];
} completionHandler:^(BOOL success, NSError *error) {
if (success)
{
NSLog(@"didFinishRecordingToOutputFileAtURL - success for ios9");
}
else
{
NSLog(@"%@", error);
}
}];