iOS6。我在“设置”应用中登录了 Twitter。
我关闭了我的应用程序,然后重新运行了设置应用程序。
ACAccountStore *store = [[ACAccountStore alloc] init];
ACAccountType *accountType = [store accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
[self createAccountPickerForAccountType:accountType withStore:store];
...
- (void)createAccountPickerForAccountType:(ACAccountType *)accountType withStore:
self.accounts = [store accountsWithAccountType:accountType];
[self displayAccountPicker];
返回的数组是一个空数组。