Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7887275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:32:12+00:00 2026-06-03T05:32:12+00:00

I have an ARC-enabled project using RestKit and although most of my requests are

  • 0

I have an ARC-enabled project using RestKit and although most of my requests are done asynchronously, I am having an issue with performing a synchronous request:

In my AppDelegate:

else if (![IKUserController loggedInUserIsAuthenticated]) {
    IKLoginViewController *loginVC = [[IKLoginViewController alloc] init];
    loginVC.scenario = SCENARIO_EXISTING;
    [self.window.rootViewController presentModalViewController:loginVC animated:YES];
}

In the implementation for loggedInUserIsAuthenticated:

+ (BOOL)loggedInUserIsAuthenticated {
    IKUser *user = [IKUserController loggedInUser];

    if (!user) {
        return NO;  
    }
    else {
        NSString *username = user.userName;
        NSString *password = user.userPassword;

        if ([IKUserController loginWithUsername:username password:password]) {
            return YES;
        }
        else {
            return NO;
        }
    }

    return NO;
}

and the loginWithUserName:password:

+ (BOOL)loginWithUsername:(NSString *)username password:(NSString *)password {

    //return YES;

    NSDictionary *params = [[NSDictionary alloc] initWithObjectsAndKeys:username, @"username", password, @"password", nil];

    RKResponse *response = [[[RKClient sharedClient] post:@"/user/authenticate" params:params delegate:nil] sendSynchronously];

    if (response.isOK) {
        return YES;
    }
    else {
        return NO;
    }

    return NO;
}

and the error:

*** Assertion failure in -[RKRequestQueue removeRequest:decrementCounter:], /Users/admin/Documents/dev/RestKit/Code/Network/RKRequestQueue.m:350
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:32:13+00:00Added an answer on June 3, 2026 at 5:32 am

    The RKClient method post already adds the request to the default request queue, so I think the problem is that you send the request twice – once async and once sync. Instead of using RKClient post method, configure the request manually. There is a method setupRequest on RKClient, this will make it easier for you and you will only need to define the url, method and params, like this:

    RKRequest* req = [RKRequest requestWithURL:reqURL delegate:self];
    [req setMethod:RKRequestMethodPOST];
    [req setParams:params];
    
    [client setupRequest:req];
    
    [req sendSynchronously];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

for an iOS 5.0 application using ARC, i have an NSArray of objects that
In my iOS 5 project with ARC enabled, one of my objects gets released
Is it possible to have an iOS app that's not ARC enabled but with
Why do I have a memory leaking with ARC enabled(highlighted in bold)? I have
In a doc-based ARC-enabled application I have a WebView that is opening an HTML
Note: the below is using iOS with Automatic Reference Counting (ARC) enabled. I think
I have the following code, which is causing a leak, despite ARC being enabled
I have recently converted my project to use ARC (Automatic Reference Counting). It doesn't
I have an iOS app that I want to convert to using ARC .
Before the ARC was in place for ios development, i have been using something

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.