我尝试以aac类型录制语音文件 并显示在uitable和工作良好,但我无法显示在iTunes文件共享
我激活了 UIFIleSharingEnabled
但我无法在itunes文件中查看aac文件,分享我该怎么办?
档案格式 AudioformatMPEG4AAC
fileaddres:file:// localhost / Users / myuser / .. .aac
保存部分
NSArray *keys = [NSArray arrayWithObjects:@"voicestr",,@"datestr",@"durstr",nil];
NSDictionary * HistDict =[[NSDictionary alloc] initWithObjects: [NSArray arrayWithObjects:myString,timeString,dateString,currentimeLbl.text,bestsize ,nil] forKeys:keys];
[Hist addObject:HistDict];
加载文件
BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:myPath];if (fileExists)
HistValue = [[NSMutableArray alloc] initWithContentsOfFile:myPath];
答案 0 :(得分:1)
您可以使用以下方法获取iOS的文档目录:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *basePath = [paths objectAtIndex:0]
添加文件名
NSString *fielWithPath = [basePath stringByAppendingPathComponent:@"fileNaem"];
您必须在info.plist
UIFileSharingEnabled = YES