2
我正在使用SLRequest
發佈到Twitter的應用程序。我已經在模擬器上工作了,但它不適用於我的設備。ACAccountStore返回設備上的空數組,但在模擬器上工作
[self.accountStor accountsWithAccountType:accountTypeTwitter];
返回我設備上的空數組,但它在模擬器上顯示正確的帳戶。我不知道爲什麼會發生這種情況。
我有一種方法可以獲取用戶的Twitter帳戶。它看起來像這樣:
- (void)fetchTwitterAccounts
{
if (self.accountStore == nil) {
self.accountStore = [[ACAccountStore alloc] init];
}
ACAccountType *accountTypeTwitter = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
self.twitterAccounts = [self.accountStore accountsWithAccountType:accountTypeTwitter];
[self.tableView reloadData];
}
爲什麼我沒有在我的設備上獲得任何帳戶的任何想法?
謝謝,讓它工作。 – Anders 2013-04-21 10:57:21