0

音声ファイルを 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];
4

1 に答える 1

1

次の方法でiOSのドキュメントディレクトリを取得します。

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

NSString *basePath = [paths objectAtIndex:0] 

ファイル名を追加します

NSString *fielWithPath = [basePath stringByAppendingPathComponent:@"fileNaem"];

そして、あなたはでファイル共有を有効にする必要がありますinfo.plist

UIFileSharingEnabled = YES
于 2013-03-10T13:10:11.167 に答える