3

Hi I request please read the question completely before marking it as duplicate.

I am trying to get the iphone browsing history by using Webkit private framework.I get the headers for it from the github site. But I am not getting which headers or which methods to use to accomplish my task. I tried with the following code but its not returning anything not even null.

WebHistory *history=[WebHistory optionalSharedHistory];
NSDate *now = [NSDate date];
//id date;
NSArray *arr = [history orderedItemsLastVisitedOnDay:now];
NSLog(@"%@",[history allItems]); 

I am writing in house app so i don't mind with this private framework. But i just can't go for jailbreaking. Please guide me the right way.

Niv
  • 59
  • 1
  • 4

1 Answers1

0

In order for the optionalSharedHistory method to return anything but null it must be instantiated and set like so in a place that's convenient in your application. Like a root view controller or the AppDelegate.

// Create a shared WebHistory object
WebHistory *myHistory = [[WebHistory alloc] init];
[WebHistory setOptionalSharedHistory:myHistory];

Hope this helps!

IanStallings
  • 806
  • 10
  • 21