新的gpg.framework 4.1.1中不存在GPGAppstateModel

时间:2015-06-29 04:03:56

标签: ios google-play-games

更新到gpg.framework ver 4.1.1后,我发现GPGAppstateModel不再存在,因此iOS游戏中的某些命令会返回错误。 我用来在游戏中加载令牌的代码示例:

GPGAppStateModel *model = [GPGManager sharedInstance].applicationModel.appState;
    NSNumber *totalTokensKey = [NSNumber numberWithInt:CloudSaveKey_TotalTokens];

    [model loadForKey:totalTokensKey completionHandler:^(GPGAppStateLoadStatus status, NSError *error) {
        if (status == GPGAppStateLoadStatusNotFound) {
            // Data for this key does not exist. This must be the first time our user
            // played this game
            NSLog(@"Total tokens does not exist");

        } else {}
}

无论如何我可以解决这个问题吗?

0 个答案:

没有答案