2

I have a chrome plugin I've written that does stuff like:

  • sets cookies on the user's behalf
  • visits a certain sequence of urls, posting form data, and reading returned HTML and cookies (this has to be from a real browser, not a series of programmed http connections.)
  • opens tabs to specific urls

Basically in the chrome plugin world I have complete control to do almost anything (once the user agrees and installs the plugin.)

In there any way to do this in a native iOS app? I realize there is no plugin system for either safari or chrome on iOS. Do I stand a chance using UIWebView? Or is UIWebView way too limited? Is there a complete webkit or mozilla browser code in Objective-C I can use and modify for my needs? Thanks!

4

1 回答 1

1

如果您正在构建原生 iOS 应用程序,这绝对是可能的。

NSHTTPCookieStorage1) 您可以通过API与 cookie 进行通信。

2)您可以发送网络请求并在后台队列上处理它们的数据,之后您可以设置UIWebView(在主队列上)的HTML内容。

3)您的“标签”可以简单地是兄弟视图控制器,每个控制器都包含一个UIWebView.

于 2013-07-26T03:29:26.213 回答