Apple did not provide proper descriptions for the error conditions in iOS. This is not an error in the code or theirs - the lines are simply missing on iOS devices.
To provide more interesting error information, you will need to check the domain and code of the CFError and NSError objects and return something. A list of error descriptions from kCFErrorDomainCFNetwork is available here on the Apple website. Code like this will help - name it when building the error presentation interface.
NSString *GetUsefulErrorDescription(NSError *e) { NSString *codeString = [NSString stringWithFormat: @"%li", (long)[e code]]; NSString *localized = NSLocalizedStringInTable(codeString, [e domain], nil); if (!localized || [localized isEqual: codeString]) return [e localizedDescription]; else return localized; }
It looks in a file in your application bundle called "kCFErrorDomainCFNetwork.strings" for a string such as "100" (for kCFSOCKSErrorUnknownClientVersion, the value of which you can specify as "the SOCKS server denied access because it does not support connections with the requested version of SOCKS." ) If such an error description is not available, instead, the string returned by NSError , which will be "The operation cannot be completed. [...]"
source share