1
次の方法を考えてみましょう。iOS画像ピッカーがビデオのファイルパスを返さない
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
// Apparently valid URL, looks like
// "file:///private/var/mobile/Containers/Data/Application/.../filename.mov"
NSURL *videoURL = info[UIImagePickerControllerMediaURL];
// Always evaluates to false; no videos are saved
if (UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(videoURL.absoluteString) {
UISaveVideoAtPathToSavedPhotosAlbum(videoURL.absoluteString, self, @selector(video:didFinishSavingWithError:contextInfo:), nil);
}
}
なぜこれが機能しないのですか?どのように修正しますか?