You need to sign in to do that
Don't have an account?

zkSforce (iPhone Simulator) - uncaught exception with wrong login credentials
Hi,
under OSX I had no problems with wrong login credentials - no program termination.
Now programming against iOS (iPhone Simulator 3.1.3) my App wants to do this
ZKSforceClient *client = [[ZKSforceClient alloc] init];
[client login:userid password:password];
and terminates with this log:
[Session started at 2010-12-02 09:48:57 +0100.]
2010-12-02 09:49:00.487 iOppBrwsr[9241:207] sendRequest - before THROW
2010-12-02 09:49:00.489 iOppBrwsr[9241:207] *** Terminating app due to uncaught exception 'INVALID_LOGIN', reason: 'INVALID_LOGIN: Invalid username, password, security token; or user locked out.'
2010-12-02 09:49:00.489 iOppBrwsr[9241:207] Stack: (
30590043,
2553984265,
14504,
30409,
29873,
11044,
2819463,
2857398,
2845492,
2827903,
2855009,
37481817,
30374784,
30370888,
2821653,
2858927,
10708,
10562
)
@throw [ZKSoapException exceptionWithFaultCode:fc faultString:fm];
When looking on SF3 code I found code which probably is made for handling the exception in a try/catch pattern.
So I will learn and reuse from this now and maybe my question above will be solved.
All Answers
When looking on SF3 code I found code which probably is made for handling the exception in a try/catch pattern.
So I will learn and reuse from this now and maybe my question above will be solved.
That's what i'm using as a pattern. Hope that helps. I just put an alertview in the appManager class. That way I can centralize logging the error. I'm using that for all the API Calls and switching on context: for CRUD action selectors.
That's the pattern for the iOS toolkit (which forked zkSforce), not the original zkSforce library, so it'll depend on exactly which library is being used.