通知中心插件:ios 5 Twitter 帐户为零?

发布于 2024-12-29 04:03:47 字数 602 浏览 4 评论 0原文

我正在使用 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...

希望你能帮助我,

bensge

I'm developing a notificationcenter plugin with theos, which is accessing the ios 5 build-in twitter accounts. My problem is, that the accounts i get from the os are nil.
What am i doing wrong?
I am first creating a ACAccountStore, than i ask for acess to the accounts and after completion i save the accounts in an 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...

Hope you can help me,

bensge

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文