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 8430037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:29:58+00:00 2026-06-10T05:29:58+00:00

I have a segue that I do like this: [self performSegueWithIdentifier:@PlanToBusiness sender:self]; it works

  • 0

I have a segue that I do like this:

[self performSegueWithIdentifier:@"PlanToBusiness" sender:self];

it works on the iPhone but not on the iPad. What I do is make a remote call to a server, and when the server response comes back correctly, I try to take the user to the new page with that segue.

It works on the iPhone simulator, but not the iPad (the identifying string is the same for both) and on the iPad it crashes with this error:

bool _WebTryThreadLock(bool), 0x68f9cb0: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...
1   WebThreadLock
2   -[UITextRangeImpl isEmpty]
3   -[UITextRange(UITextSelectionAdditions) _isCaret]
4   -[UITextSelectionView setCaretBlinks:]
5   -[UIKeyboardImpl setCaretBlinks:]
6   -[UIKeyboardImpl setDelegate:force:]
7   -[UIKeyboardImpl setDelegate:]
8   -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:]
9   -[UINavigationController navigationTransitionView:didStartTransition:]
10  -[UINavigationTransitionView transition:fromView:toView:]
11  -[UINavigationTransitionView transition:toView:]
12  -[UINavigationController _startTransition:fromViewController:toViewController:]
13  -[UINavigationController _startDeferredTransitionIfNeeded]
14  -[UINavigationController pushViewController:transition:forceImmediate:]
15  -[UINavigationController pushViewController:animated:]
16  -[UIStoryboardPushSegue perform]
17  -[UIStoryboardSegueTemplate perform:]
18  -[UIViewController performSegueWithIdentifier:sender:]
19  __41-[PlanBusinessController submitBusiness:]_block_invoke_0
20  __block_global_0
21  -[NSBlockOperation main]
22  -[__NSOperationInternal start]
23  -[NSOperation start]
24  __block_global_6
25  _dispatch_call_block_and_release
26  _dispatch_worker_thread2
27  _pthread_wqthread
28  start_wqthread

I am also not too used to reading Obective-C stack traces so I am having a hard time pinpointing what the problem is.

Here is how I do this:

- (IBAction)submitBusiness:(id)sender 
{    
     // Make a url to send

     NSURL *url = [NSURL URLWithString:full_encoded_url_string];
     NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];

        // ***************
        // TODO: ok I dont really understand what this is
        NSOperationQueue *queue = [[NSOperationQueue alloc] init];
        // **************

        [NSURLConnection sendAsynchronousRequest:urlRequest queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error)
         {   
                         // I took out a lot of the logic code that is not needed

                         [self performSegueWithIdentifier:@"PlanToBusiness" sender:self];
         }];
    }
}
  • 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-10T05:29:59+00:00Added an answer on June 10, 2026 at 5:29 am

    When methods that touch the UI, such when performing a segue, it is important to make sure you are calling that code from the main thread. The easiest way to do that is to make a method like this:

    - (void)performPlanToBusinessSegueOnMainThread
    {
        [self performSegueWithIdentifier:@"PlanToBusiness" sender:self];
    }
    

    Then, you can call this method in your finished block like this:

    [NSURLConnection sendAsynchronousRequest:urlRequest queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error)
     {   
         // I took out a lot of the logic code that is not needed
    
         [self performSelectorOnMainThread:@selector(performPlanToBusinessSegueOnMainThread) 
                                withObject:nil 
                             waitUntilDone:YES];
     }];
    

    It is a little circuitous, but it should fix your exception. It would be better if we could just call performSegueWithIdentifier in the performSelectorOnMainThread method, but it has too many arguments.

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

Sidebar

Related Questions

This may not be possible, but I'm hoping someone will have an idea how
i have a modal segue , and the top thing that has like the
I have a segue (called ToSettingsSegue ) that pushes a custom view controller (
I have a first table view and a segue that pushes to another table
In Xcode 4.2, I know that one can use the storyboard segue to have
I'm tinkering with an iPad app that (like many iPad apps) doesn't use the
I am new to iPad development (or iPhone for that matter :) ) and
I have this int I am declaring in my .h file like this: @interface
I have a UIViewController in a storyboard iPhone app that I need to reuse
I know this might sound that it should be trivial but I am finding

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.