title: iOS XCtest accessing App View Controllers/UI
body: <p>I am new to <em>iOS</em> development. I want to write unit tests for an app which uses an SDK where the authenticate method is of the form:</p>
  
  <pre><code>(void)authenticate:(UIViewController *)presentingViewController clearCookies:(BOOL)clearCookies completionBlock:(AuthCompletionBlock)completionBlock.
  </code></pre>
  
  <p>To authenticate the user, an embedded web browser needs to open in the <code>UIViewController</code><em>(passed in the method parameters)</em> . Can the unit tests access app UI? 
  How do I make sure that the browser opens, user authenticates thru app UI and then the unit tests execute.</p>