我现在可以在iOS和Cordova 2.9上使用此功能. (在iOS7上测试).
我要做的就是:
>从此方法中删除注释(processVideo)
-(CDVPluginResult *)processVideo:(NSString *)moviePath forCallbackId:(NSString *)callbackId
{
????//将电影保存到相册(仅适用于iOS 3.1)
/* don't need, it should automatically get saved*/
NSLog(@"can save %@: %d ?", moviePath, UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(moviePath));
if (&UIVideoAtPathIsCompatibleWithSavedPhotosAlbum != NULL && UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(moviePath) == YES) {
NSLog(@"try to save movie");
UISaveVideoAtPathToSavedPhotosAlbum(moviePath, nil, nil, nil);
NSLog(@"finished saving movie");
}
// create MediaFile object
NSDictionary* fileDict = [self getMediaDictionaryFromPath:moviePath ofType:nil];
NSArray* fileArray = [NSArray arrayWithObject:fileDict];
return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:fileArray];
}
注意:
他们告诉我们不需要它,它应该自动保存.但就我而言,它没有得到保存.
>重建科尔多瓦图书馆
>重建后,如果链接器有问题,请从项目的“构建设置”的“有效架构”中删除arm64,arm7s架构.
>然后,您保存了视频.