0

新しいFBIOSSDKを使用していますが、アプリがクラッシュし、以下のエラーが発生します

-FBCacheIndex _updateEntryInDatabaseForKey:entry:、/ Users / chrisp / src / ios-sdk / src /FBCacheIndex.mでのアサーションの失敗キャッチされない例外'NSInternalInconsistencyException'によるアプリの終了、理由:'' *最初のスロー呼び出しスタック:(0x334072a3 0x3b0a197f 0x3340715d 0x33cdcb13 0x10b3b1 0x10b635 0x10a7bf 0x3b4b911f 0x3b4b899b 0x3b4b8895 0x3b4c7215 0x3b4c73b9 0x3b4eda11 0x3b4ed8a4)

私はグーグルを作り、他のリンカーフラグに-lsqlite3.0のような解決策を見つけ、-lsqlite3フレームワークを追加しましたが、FBsessionがありません。そして私はすべてをやりましたが、それでも私は同じ問題を抱えています。

以下の私のコード:

NSObjectタイプであるFBClass.m内

-(void) getFriendListForInvitation
 {

@ try {

    if (self.friendPickerController == nil) {
        // Create friend picker, and get data loaded into it.
        self.friendPickerController = [[FBFriendPickerViewController alloc] init];

        self.friendPickerController.title = @"Invite Friends";
        self.friendPickerController.delegate = self;
        [self.friendPickerController clearSelection];
        [self.friendPickerController loadData];
        self.friendPickerController.itemPicturesEnabled = TRUE;

    }
    else{
        [self.friendPickerController clearSelection];
        [self.friendPickerController updateView];
    }
    self.friendPickerController.allowsMultipleSelection = FALSE;


    // iOS 5.0+ apps should use [UIViewController presentViewController:animated:completion:]
    // rather than this deprecated method, but we want our samples to run on iOS 4.x as well.
    if([[[UIDevice currentDevice] systemVersion] intValue] >= 5.0)
        [[[appdelegate.navigationController viewControllers] lastObject] presentViewController:self.friendPickerController  animated:TRUE completion:nil];
    else
        [[[appdelegate.navigationController viewControllers] lastObject] presentModalViewController:self.friendPickerController animated:YES];

}
@catch (NSException *exception) {
    NSLog(@"%@",[exception description]);
}

}

この問題を解決するのを手伝ってください.....

ありがとう

4

1 に答える 1

0

問題を解決できましたか?私は同じ問題に苦しんでいます。
この例外はcache.db、facebook がアドレス指定しているディレクトリにファイルが見つからないことが原因であると判断しました。シミュレータを使用して確認できます。不足しているシミュレータ ファイルのディレクトリは次のとおりです。

/Users/<user name>/Library/Application Support/iPhone Simulator/6.1/Applications/<app id>/Library/Caches/DataDiskCache

それでも、ファイルが見つからない理由はわかりません。

編集:
私が思いついた唯一のことは、単純な2行のコードでアプリからセッションデータをクリアすることでした:

FBSession.activeSession = nil;
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"FBAccessTokenInformationKey"];

残念ながら、このソリューションは実際にセッションを閉じることはありませんが、少なくともアプリの適切なワークフローを提供しています.

于 2013-04-10T13:39:38.900 に答える