title: How to get cookie using objective-c
body: <p>I'm converting a java applet program to ipad version.</p>
  
  <p>In the original java applet code, there are some code to get cookie from javascript:</p>
  
  <pre><code>    JSObject browser = (JSObject) JSObject.getWindow(this);
      JSObject document =  (JSObject) browser.getMember("document");
      String cookie = (String)document.getMember("cookie"); 
  </code></pre>
  
  <p>So, how can I get this cookie using objective-c? Are there any similar classes or methods that can do the same thing? Thanks. :)</p>
  
  <p>========UPDATE========</p>
  
  <pre><code>NSString *cookie = [webView stringByEvaluatingJavaScriptFromString:@"document.cookie"];
  </code></pre>
  
  <p>using this method can read values from javascript code</p>