小编Pin*_*nky的帖子

如何在Application Bundle中创建和检查子目录

我在我的应用程序包中创建了一个新的子目录.这是我在xcode环境中完成的.

target - > copy bundle resources

现在添加一个新文件夹

为任何添加的文件夹创建文件夹引用

如何检查文件夹是否在应用程序包中创建

谢谢

subdirectory nsbundle ios

8
推荐指数
1
解决办法
5383
查看次数

使用exportAsynchronouslyWithCompletionHandler

我尝试从iPod-Library导出音频文件.我想用这个iPod-Library文件创建一个新文件.在"AV基础编程指南"的"阅读和写作资产"一章中,有一个小例子.但是这段代码对我不起作用.发生了4个错误

Export Status 4 Error Domain=AVFoundationErrorDomain 
Code=-11800 "The operation could not be completed" 
UserInfo=0x1edfa0 {NSLocalizedFailureReason=An unknown error occurred (-12124), 
NSUnderlyingError=0x1ebdc0 "The operation couldn’t be completed. (OSStatus error -12124.)", 
NSLocalizedDescription=The operation could not be completed}
Run Code Online (Sandbox Code Playgroud)

我的代码

AVURLAsset *objAvUrlAsset = [[AVURLAsset alloc] initWithURL:[tempArray objectAtIndex:0]  options:nil];

NSLog(@"%s objAvUrlAsset %@", __FUNCTION__, objAvUrlAsset);

NSArray *compatiblePresets = [AVAssetExportSession exportPresetsCompatibleWithAsset:objAvUrlAsset];

NSLog(@"%s compatiblePresets %@", __FUNCTION__, compatiblePresets);

if ([compatiblePresets containsObject:AVAssetExportPresetAppleM4A]) {


    AVAssetExportSession *exportSession = [[AVAssetExportSession alloc]
                                           initWithAsset:objAvUrlAsset presetName:AVAssetExportPresetAppleM4A];

    NSString * exportPath = [NSString stringWithFormat:@"testTrack1.M4A"];
    NSURL *exportURL = [NSURL fileURLWithPath:exportPath]; …
Run Code Online (Sandbox Code Playgroud)

iphone m4a ipod avfoundation

5
推荐指数
1
解决办法
9407
查看次数

标签 统计

avfoundation ×1

ios ×1

iphone ×1

ipod ×1

m4a ×1

nsbundle ×1

subdirectory ×1