我尝试使用以下代码,但无法访问它。如何从iPhone获取通话记录?
NSDirectoryEnumerator *dirnum = [[NSFileManager defaultManager] enumeratorAtPath: @"/private/var/mobile/Library/"];
NSLog(@"DirectoryAttributes:%@",[dirnum directoryAttributes]);
响应结果:
“DirectoryAttributes:{
NSFileCreationDate = “2008-01-01 5点38分41秒GMT”;
NSFileExtensionHidden = 0;
NSFileGroupOwnerAccountID = 501;
NSFileGroupOwnerAccountName = mobile;
NSFileModificationDate =“2011-07-29 11:38:10 GMT”;
NSFileOwnerAccountID = 501;
NSFileOwnerAccountName = mobile;
NSFilePosixPermissions = 493;
NSFileReferenceCount = 26;
NSFileSize = 986;
NSFileSystemFileNumber = 43;
NSFileSystemNumber = 234881026;
NSFileType = NSFileTypeDirectory;
}”
帮我访问call_history.db数据表。
感谢。
[iphone“无法打开数据库文件”for call_history.db in xcode app](http://stackoverflow.com/questions/5498291/iphone-unable-to -open-database-file-for-call-history-db-in-xcode-app) –
参见[iPhone call log/history](http://stackoverflow.com/questions/6214725/iphone-call-log-历史)和[访问iPhone中的通话记录历史](http://stackoverflow.com/questions/3615240/accessing-call-log-history-in-iphone) –