Requesting accounts with ACAccountStore doesn't ask permissions in iOS Simulator

Originator:phillips1988
Number:rdar://13726882 Date Originated:24-Apr-2013
Status:Open Resolved:
Product:iOS SDK Product Version:6.1
Classification:Serious Bug Reproducible:Always
 
Summary: When requesting an account using the ACAccountStore's -requestAccessToAccountsWithType:options:completion: method, on the iPhone and iPad simulators no permissions dialog is shown.

Steps to Reproduce: 

- (void)getTwitterAccount
{
    ACAccountStore *accountStore = [[ACAccountStore alloc] init];
    ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
    
    [accountStore requestAccessToAccountsWithType:accountType options:nil completion:^(BOOL granted, NSError *error) {
        if(granted) {
            NSArray *accountsArray = [accountStore accountsWithAccountType:accountType];
            
            if ([accountsArray count] > 0) {
                ACAccount *twitterAccount = [accountsArray objectAtIndex:0];
                NSLog(@"%@",twitterAccount.username);
                NSLog(@"%@",twitterAccount.accountType);
            }
        }
    }];

}

Expected Results: An alert box with options to grant access or not to one's account.

Actual Results: No alert box is shown and permission is granted.

Comments

Also doesn't run the completion routine

This is serious for me, because I have work to do in the completion routine -- which is never called (at least for Facebook accounts) on the simulator. No error is generated, it just doesn't call the completion routine on any thread ever.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!