The Apple documentation for NSURLCredential says that it may not always return a password. But other than the obvious reason that no password was stored with credential, is there any reason that a default credential permanently stored in NSURLCredentialStorage would randomly return no password?
The odd thing is some percentage of the time it works fine. But occasionally reading the password property on a default credential returns nil. The credential object appears to be valid in other respects, but the password property just returns nil.
The password reading is occurring in a thread that isn't the main thread, so I was wondering if there is some threading limitation, though I couldn't find anything in the doc.
Is it possible that we need to retry getting the password after some period of time or something?