Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/99.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在ios中保存aif文件格式的问题_Ios_Objective C_Alassetslibrary - Fatal编程技术网

在ios中保存aif文件格式的问题

在ios中保存aif文件格式的问题,ios,objective-c,alassetslibrary,Ios,Objective C,Alassetslibrary,我试图编写“output.aif”的文件格式。我使用下面的代码将其写入路径。文件保存在两个位置,一个在我指定的路径,另一个默认情况下保存在图像库中,文件名为随机数。退出应用程序时,我使用从保存的位置删除保存的“.aif”文件,但我无法删除在库中保存的文件,因为我不知道文件的名称 有没有办法停止保存默认情况下从gallery保存的“aif”文件 是否有人建议使用不同的代码将文件保存在某个位置,而该位置不会将文件保存在gallery中 ALAssetsLibrary *library = [[ALA

我试图编写“output.aif”的文件格式。我使用下面的代码将其写入路径。文件保存在两个位置,一个在我指定的路径,另一个默认情况下保存在图像库中,文件名为随机数。退出应用程序时,我使用从保存的位置删除保存的“.aif”文件,但我无法删除在库中保存的文件,因为我不知道文件的名称

有没有办法停止保存默认情况下从gallery保存的“aif”文件

是否有人建议使用不同的代码将文件保存在某个位置,而该位置不会将文件保存在gallery中

ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];



[library writeVideoAtPathToSavedPhotosAlbum:url completionBlock:^(NSURL *assetURL, NSError *error){
    if (error) {
    }
    else{            
        NSString *outputTp = [[[NSHomeDirectory() stringByAppendingString:@"/Documents/"] stringByAppendingString:@"output.aif"] retain];
        inUrl = [url retain];
        outUrl = [[NSURL fileURLWithPath:outputSound] retain];
        reader = [[EAFRead alloc] init];
        writer = [[EAFWrite alloc] init];
        self.url = outputTp;


        // this thread does the processing
        [NSThread detachNewThreadSelector:@selector(processThread:) toTarget:self withObject:nil];
    }
}];

我不明白。你们为什么把钱存进图书馆?首先,output.aif从何而来?是你的吗?嗯,有很多关于保存数据的教程。我不知道你在问什么。发生这种情况是因为您使用了
writeVideoAtPathToSavedPhotosAlbum:
。您是否询问如何将给定URL处的视频下载到文档目录?