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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:58:44+00:00 2026-06-15T11:58:44+00:00

I have an app that, according to crash logs, is crashing on startup while

  • 0

I have an app that, according to crash logs, is crashing on startup while checking if the user is logged into Facebook on the device. The problem is that I cannot reproduce this crash, and it happens on different devices. So far, I have only seen this crash in pre-iOS 6 operating systems. The earliest iOS supported by my app is 4.3.

Here is the code, if anyone can provide a clue as to why this method sometimes fails (and most times does not!)

The error I get is EXC_BAD_ACCESS (SIGSEGV);KERN_INVALID_ADDRESS at 0x00000000.

    + (BOOL)loggedIntoServiceOnDevice:(int)socialService {

        __ENTERING_METHOD__
        BOOL loggedIntoServiceOnDevice = NO;
        ACAccountStore *accountStoreHere = [[NSClassFromString(@"ACAccountStore") alloc] init];
        ACAccountType *accountType;
        ACAccountType *accountType2;

        if (accountStoreHere) {
            if (socialService == FACEBOOK_SERVICE) {

                ACAccountType *accountType = [accountStoreHere accountTypeWithAccountTypeIdentifier:@"com.apple.facebook"];
                Class slComposeController = NSClassFromString(@"SLComposeViewController");
                if (accountType && slComposeController != nil)
                {
                    if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {

                         loggedIntoServiceOnDevice = YES;
                    }
                }
            }
            else if (socialService == TWITTER_SERVICE) {
                ACAccountType *accountType = [accountStoreHere accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
                if (accountType)
                {
                    Class slComposeController = NSClassFromString(@"SLComposeViewController");
                    if ([TWTweetComposeViewController canSendTweet] || slComposeController != nil) {
                        if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) {

                            loggedIntoServiceOnDevice = YES;
                        }
                    }
                }
            }
        }
        [accountStoreHere release];
        return loggedIntoServiceOnDevice;
    }
  • 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-15T11:58:45+00:00Added an answer on June 15, 2026 at 11:58 am

    The following line is also executed in iOS 5 since [TWTweetComposeViewController canSendTweet] is returning YES so the second part of the OR check is not evaluated, since the first one already returned YES:

    [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]
    

    You might want to change those if statements to something like:

    if ([TWTweetComposeViewController canSendTweet] ||
        (
         slComposeController != nil &&
         [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]
        )
       ) {
    

    This makes sure, that SLComposeViewController is only used, if the class actually exists.

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

Sidebar

Related Questions

I have an app that lets the user interact with several forms. I can
I have an iOS app that pulls user data down from a web service
I have an app that I created it increases according to its content. the
I have an Android app that uses the AlarmService. According to the docs, I
I have a Facebook app that is built as an iFrame. I am using
have an Android app that uses the RECEIVE_BOOT_COMPLETED. According to the docs, I should
I have a WinForms .NET app that, according to the Vista Task Manager with
have an app that finds your GPS location successfully, but I need to be
Have an app that has listings - think classified ads - and each listing
I have an app that switches between full screen and normal screen for a

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.