Question: i have to make some updates to a web site built using expression engine. There is no staging area available so i'd like to create a test area of the web site accessible only to site owners allowing them to preview the changes. 

Ordinarily, i'd just create a "test" folder and direct the users to this URL. I'm new to Expression Engine and not sure how to achieve this. Any help would be much appreciated.

Answer: 
I've just implemented this by setting basic auth credentials using an `NSMutableURLRequest` for the `UIWebView`. This also avoids the round trip incurred when implementing `sharedCredentialStorage` (of course there are tradeoffs involved).

Solution:

```
    NSString *url = @"http://www.my-url-which-requires-basic-auth.io"
    NSString *authStr = [NSString stringWithFormat:@"%@:%@", username, password];
    NSData *authData = [authStr dataUsingEncoding:NSASCIIStringEncoding];
    NSString *authValue = [NSString stringWithFormat:@"Basic %@", [authData base64EncodedString]];
    NSMutableURLRequest *mutableRequest = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:url]];
    [mutableRequest setValue:authValue forHTTPHeaderField:@"Authorization"];
    NSURLRequest *request = [mutableRequest copy];
    NSURLRequest *request = [NSURLRequest basicAuthHTTPURLRequestForUrl:url];
    [self.webView loadRequest:request];

```

You can grab the NSData+Base64 category which implements the `base64EncodedString` for NSData from [Matt Gallagher's page](http://www.cocoawithlove.com/2009/06/base64-encoding-options-on-mac-and.html) (it was at the bottom of the blog post when I downloaded it)
Make sure to remember that logging out is not so easy with sessions and UIWebView credentials. See answer here: <https://stackoverflow.com/a/18143902/2116338>.