Tea Bee
Tea Bee

Reputation: 421

How to read the call log on iPhone iOS 5 programmatically

I found many code samples for reading the call log on iOS 4, but it seems that this feature (reading the call log DB) is not enabled on iOS 5.

So what is the work-around? Is there any (third party?) method or trick to be able to read the call log in iOS 5?

Upvotes: 4

Views: 4530

Answers (1)

user847114
user847114

Reputation:

Take a look at the SpyPhone project on GitHub.

For example, you can get the most recently dialed number like so:

NSString *path = @"/var/mobile/Library/Preferences/com.apple.mobilephone.plist";
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];
NSString *lastDialed = [NSString stringWithFormat:@"%@", [d valueForKey:@"DialerSavedNumber"]];

This works on my iOS5 phone. I would not expect Apple to be happy with this sort of functionality anymore.

Upvotes: 5

Related Questions