开发者

RestKit Login problem

Can anyone give me a hint why I can not login into my service? I dont get an response to my delegate. The service is working. If I call the url in my browser I get a login (Browser receives a cookie) and then I can call request on my service:

Here is my Code:

RKClient *client =[RKClient clientWithBaseURL:@"https://myserverinstance/mobileapp/"];

NSString *loginString = @"SSO.login?application=myAppName&language=en&username=MyUserName&password=MyPassword&permanentLogin=true";

    [开发者_高级运维RKClient setSharedClient:client];
    if([[RKClient sharedClient] isNetworkAvailable]){;
        NSLog(@"Network is available");
        [[RKClient sharedClient] get:loginString delegate:self]; 


I'm assuming that the typos in your posted code (e.g. if([[RKClient sharedClient] isNetworkAvailable]){;) do not exist in your actual project.

Are your SSL certificates self-signed? If so, you'll need to set the RESTKIT_SSL_VALIDATION preprocessor directive. You'll also need to link against Security.framework.

If your certificates are signed by a common authority, then you should post more information about your problem. Turn RestKit logging on with RKLogConfigureByName("RestKit/Network", RKLogLevelTrace); and see if that provides any hints to where the problem really lies.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜