2013-08-14 11 views
4

트위터 계정에 액세스하려고 시도 중이지만이 코드는 accountTypeWithAccountTypeIdentifier에서 중지됩니다.accountTypeWithAccountTypeIdentifier가 완료되지 않았습니다.

내 코드는 내가 아이폰 OS 6 실행 해요 다음과 같습니다

#import <Accounts/Accounts.h> 
#import <Social/Social.h> 
#import <Twitter/Twitter.h> 

NSLog(@"1"); 
ACAccountStore *accountStore = [[ACAccountStore alloc] init]; 
NSLog(@"2"); 
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter]; 
NSLog(@"3"); 
[accountStore requestAccessToAccountsWithType:accountType options:nil completion:^(BOOL granted, NSError *error) { 

    NSLog(@"5"); 

}]; 
NSLog(@"4"); 

나는, NSLogs 1과 2를 얻을 accountTypeWithAccountTypeIdentifier 라인이 반환되지 않음을 의미한다. 나는 주 스레드와 백그라운드 스레드 모두에서 아무런 쓸모가 없다.

+0

이것은 무엇입니까? 문제를 자세히 설명해주세요. –

답변

0

Accounts.framework를 프로젝트에 추가하는 것을 잊어 버린 경우가 많습니다. (이 문제는 나에게 동일한 문제가 해결됨)

관련 문제