I check if there is used twitter account with this code:
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
NSArray *arrayOfAccounts = [accountStore accountsWithAccountType:accountType];
If i run it on iOS 6 simulator with twitter account, arrayOfAccounts.count is 1, but on iPhone 4 iOS6, arrayOfAccounts.count is 0.
What am i doing wrong?
I also got same problem. Use this code.
Reason for this is that it does not get permissions from settings for Twitter account access, so we need to check that first.