title: What is the default cookieAcceptPolicy
body: <p>I'm working on a iOS SDK that needs the <code>cookieAcceptPolicy</code> of the <code>[NSHTTPCookieStorage sharedHTTPCookieStorage]</code> to be <code>NSHTTPCookieAcceptPolicyAlways</code> which should be the default according to the documentation:</p>
  
  <blockquote>
    <p>The default cookie accept policy is NSHTTPCookieAcceptPolicyAlways. Changing the cookie policy affects all currently running applications using the cookie storage.</p>
  </blockquote>
  
  <p>I've just created a new iOS project in XCode and this does not seem to be the case. The default policy is <code>NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain</code>: </p>
  
  <pre><code>// this logs "cookieAcceptPolicy 2" (NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain)  
  NSLog(@"cookieAcceptPolicy %@", @([NSHTTPCookieStorage sharedHTTPCookieStorage].cookieAcceptPolicy));  
  </code></pre>
  
  <p>So the questions are</p>
  
  <ol>
  <li>Why is the default cookieAcceptPolicy <code>NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain</code> even if I did not change it?</li>
  <li>Is the <code>sharedHTTPCookieStorage</code> shared across iOS applications?</li>
  <li>Can the <strong>user</strong> of an application change the cookie accept policy via some iPhone settings?</li>
  <li>What is the <code>cookieAcceptPolicy</code> of a <code>UIWebView</code> in a app?</li>
  </ol>
  
  <p>cheers,
  Jan</p>