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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:04:12+00:00 2026-06-11T22:04:12+00:00

Okay this is the first place in my app I’m using a block for

  • 0

Okay this is the first place in my app I’m using a block for anything so is there some setup or Xcode setting I need to check? This seems to me a simple use of blocks, not doing anything fancy but it crashes out on: tweetViewController.completionHandler = ^(TWTweetComposeViewControllerResult result) in the iOS 6 simulator.

- (void) showTweetComposer
{
    TWTweetComposeViewController *tweetViewController = [[TWTweetComposeViewController alloc] init];

    [self presentViewController:tweetViewController animated:YES completion:nil];

    tweetViewController.completionHandler = ^(TWTweetComposeViewControllerResult result)
    {
        [self dismissModalViewControllerAnimated:YES];
    };

    [tweetViewController release];
}



thread #1: tid = 0x1c03, 0x02e3d09f libobjc.A.dylib`objc_msgSend + 19, stop reason = EXC_BAD_ACCESS (code=2, address=0x0)
    frame #0: 0x02e3d09f libobjc.A.dylib`objc_msgSend + 19
    frame #1: 0x02e28cc9 libobjc.A.dylib`objc_setProperty_nonatomic_copy + 49
    frame #2: 0x051c38b2 Social`-[SLTwitterComposeViewController setCompletionHandler:] + 47
    frame #3: 0x001e2e06 MyApp`-[SocialViewController showTweetComposer] + 246 at SocialViewController.m:137
    frame #4: 0x001e2ff7 MyApp`-[SocialViewController tweetToFriendsRowTouched] + 247 at SocialViewController.m:150
    frame #5: 0x02e3f663 libobjc.A.dylib`-[NSObject performSelector:] + 62
    frame #6: 0x0018b4f1 MyApp`-[GroupedTableViewController tableView:didSelectRowAtIndexPath:] + 401 at GroupedTableViewController.m:143

This happens whether I’m logged into twitter or not.

EDIT: I added a simple block based code snippet to the beginning for my showTweetComposer method to test that any kind of blocks are working in my code:

[UIView animateWithDuration:0.2 animations:^{
self.view.alpha = 0.0;
} completion:^(BOOL finished){
[self.view removeFromSuperview];
}];

Now it is crashing on this new block. So, it would seem there’s something in my project that needs to be set to support using blocks but I’m not sure what that would be. My iOS deployment target is set to iOS 4.3.

  • 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-11T22:04:14+00:00Added an answer on June 11, 2026 at 10:04 pm

    Okay, solved. This gist is, don’t weak-link against libSystem.dylib using -weak_library

    Found the answer here

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

Sidebar

Related Questions

Okay this is my first WPF app and I am having a hard run
Okay look first thanks for this place :) I would like to create a
Okay first up I am using: DirectX 10 C++ Okay this is a bit
Okay, so this is my first project using PHP and MySQL and I thought
Okay this is a fairly broad question. This is my first App and I'm
Okay at first I thought this would be pretty straightforward. But I can't think
Okay, so not sure if apple.stackexchange is a better place for this, but I
Okay so I have two import pieces of code involved in this. This first
Okay so I feel like there's something obvious I'm missing in this question. I've
Okay this question is very simple: I have a facebook page, and a website.

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.