如何从iphone获取通话记录? [英] How to get call history from iphone?

查看:2791
本文介绍了如何从iphone获取通话记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用以下代码但我无法访问它。

I try with following code but i can't access it.

NSDirectoryEnumerator *dirnum = [[NSFileManager defaultManager] enumeratorAtPath: @"/private/var/mobile/Library/"];

NSLog(@"DirectoryAttributes:%@",[dirnum directoryAttributes]);

回复结果:


DirectoryAttributes:{

NSFileCreationDate =2008-01-01 05: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;

}

"DirectoryAttributes:{
NSFileCreationDate = "2008-01-01 05: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数据表。

help me to Access call_history.db data table.

谢谢。

推荐答案

你可以得到 -

BOOL callhistoryfileexist = FALSE;

NSFileManager *fileManager = [NSFileManager defaultManager];


callhistoryfileexist = [fileManager fileExistsAtPath:@"/private/var/wireless/Library/CallHistory/call_history.db"];

[fileManager release];

if(callhistoryfileexist)
{
    //copy it where you want it
}

注意:在iOS 5中无效

Note : not valid in iOS 5

这篇关于如何从iphone获取通话记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆