我正在使用 theos 开发一个通知中心插件,它正在访问 ios 5 内置的 twitter 帐户。我的问题是,我从操作系统获得的帐户为零。我究竟做错了什么?我首先创建一个 ACAccountStore,然后我要求访问帐户,完成后我将帐户保存在 NSArray 中:
accountStore = [[ACAccountStore alloc] init];
ACAccountType *accountType = self.accountStore accountTypeWithTypeIdentifier:ACAccountTypeIndentifierTwitter];
[self.accountStore requestAccessToAccountsWithType:accountType withCompletionHandler:^(BOOL granted, NSError *error){
if (granted){ _accounts = [self.accountStore accountsWithAccountType:accountType];
//now _accounts is nil, no accounts inside...
希望你能帮我,
本格