How to access Safari history from iPhone App using Private Frameworks

∥☆過路亽.° 提交于 2019-12-08 09:56:18

问题


I got a situation something like, i can use Private Frameworks of Apple in order to know the operations being performed on iPhone Safari( i.e History the Tabs being browsed and time spend on browsing kind of info).

I have gone through some of the things like Dumping Private frameworks. But i don't know which Framework to Dump i guess WebKit may help. Can some body please give the needful info to solve this problem.

i have imported the Dumped classes to Frameworks i.e WebHistory.h, WebHistoryItem.h, WebPreferences.h Please let me know in case i miss anything

 #import "WebHistory.h"

 - (void)viewDidLoad {

   [super viewDidLoad]; 

   WebHistory *history=[WebHistory optionalSharedHistory];
    NSLog(@"%@",history);

}

回答1:


You can't access the Safari History. Apps are sandboxed.

If this is for an in-house app, then you might be able to jailbreak the phones and figure out a way around the sandboxing.

Update:

see this SO link: how-to-access-iphone-safari-history-in-an-app




回答2:


We can find the history.plist in /var/mobile/Media/Safari/ and this we can read in jailbreaken iPhone.




回答3:


I think you need a good web developer who will create the web page in such a way so that you can communicate with javascript and get the message you want to get. And for dumping the framework I think you should get with uikit+ webkit framework.

I hacked my framework by using this link - http://aralbalkan.com/2106 I hope this will help to you .



来源:https://stackoverflow.com/questions/7632792/how-to-access-safari-history-from-iphone-app-using-private-frameworks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!