I\'m using basic authentication for a simple app but it stopped working in web app mode on iOS 7. It works in Safari, it worked on iOS 6 both in Safari and as a standalone web a
This worked for me.
+ (void) setBasicAuth
{
NSURLCredentialStorage* store =
[NSURLCredentialStorage sharedCredentialStorage];
NSURLCredential* creds =
[NSURLCredential credentialWithUser:@"user"
password:@"pass"
persistence:NSURLCredentialPersistenceForSession];
NSURLProtectionSpace* protectionSpace =
[[NSURLProtectionSpace alloc] initWithHost:@"your-host"
port:80
protocol:@"http"
realm:@"Your Realm"
authenticationMethod:NSURLAuthenticationMethodDefault];
[store setCredential:creds forProtectionSpace:protectionSpace];
}