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

  • Home
  • SEARCH
  • 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 9146699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:48:36+00:00 2026-06-17T10:48:36+00:00

I am attempting to load a collection of objects via RestKit and have found

  • 0

I am attempting to load a collection of objects via RestKit and have found that this operation is blocking the main thread. Specifically, this functionality is called when a UIViewController appears in the -(void)viewDidAppear:(BOOL)animated; message. As long as request is loading, the user is unable to interact with the UI, and has to wait until the operation has completed.

How can I instruct RestKit to execute the request asynchronously (I thought it already was) and stop blocking the main thread?

-(void)rtrvArtistsByStudio:(ISStudio *)studio
{
NSLog(@"Retrieving Artists for studio %ld", [studio studioID]);
NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];

NSDictionary *params = [NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"%ld", [studio studioID]] forKey:@"studioID"];

NSURLRequest *request = [restkit requestWithObject:nil method:RKRequestMethodGET path:@"/restAPI/rtrvArtistsByStudio" parameters:params];
RKManagedObjectRequestOperation *operation = [restkit managedObjectRequestOperationWithRequest:request managedObjectContext:restkit.managedObjectStore.persistentStoreManagedObjectContext success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
    NSArray *artists = [mappingResult array];
    [studio setArtists:artists];
    [notificationCenter postNotificationName:nStudioLoadedArtists object:studio];
} failure:^(RKObjectRequestOperation *operation, NSError *error) {
    NSLog(@"Failed to load artists for studio %ld due to %@", [studio studioID], error);
    [notificationCenter postNotificationName:nStudioFailedLoadingArtists object:studio];
}];
[restkit enqueueObjectRequestOperation:operation];
}

EDIT:
I should also note that restkit is a pointer to an instance of RKObjectManager.

RestKit version is 0.20

  • 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-17T10:48:37+00:00Added an answer on June 17, 2026 at 10:48 am

    Turns out that it was actually my own fault (of course). I have a UIViewController category that performs some transitions. During the transition I have the UIApplication ignore touch events until the transition has completed (0.2s, very brief). I completely forgot that this existed.

    Because I am loading some remote objects in viewDidAppear it was still ignoring touch events until that completed. Removing the touch ignore fixed the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Attempting to build a C# NPAPI plugin I have found a tutorial which describes
Using symfony2. I have a listener class that is attempting to call a method
Has anyone ever seen this odd error when attempting to load an applet? I
I am attempting to load a set of JAR files that go together to
I have a table containing about 30k records, that I'm attempting to iterate over
I'm attempting to load a dll using the System.loadLibrary(myDllFile) that I built on a
I am attempting a many-to-many list in one of my objects. I have three
I'm attempting to load JSON (from php's json_encode) into a Backbone JS collection. I've
So basically I am thinking about attempting load testing on my asp.net application using
Im attempting to load a hex literal from an xml settings file, I can

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.