通知中心插件:ios 5 Twitter 帐户为零?
我正在使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论