【发布时间】:2015-02-01 02:17:55
【问题描述】:
我正在尝试通过下一个代码将游戏数据保存到 iCloud:
GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer];
[localPlayer saveGameData:[NSData dataWithBytes:rawData->data() length:rawData->size()]
withName:[NSString stringWithUTF8String:fileName.c_str()]
completionHandler:^(GKSavedGame *savedGame, NSError *error) {
if (error == nil) {
DebugLog(@"Snapshot successfully saved");
} else {
DebugLog(@"saveSnapshot error: %@", error.description);
}
}];
但收到错误消息:The requested operation could not be completed because you are not signed in to iCloud
我尝试在 iOS 模拟器和设备上执行此操作,但没有成功。
并尝试使用测试苹果ID,开发苹果ID,新苹果ID,但也没有成功。
用户在 iOS 设置中登录 iCloud 并登录 Game Center。
有什么建议吗?
【问题讨论】:
-
找到解决办法 iCloud Drive 在设置中被关闭了。
-
哪些设置?手机上的设置?
-
老兄,这个话题已经五年了。这已经有点无关紧要了:)
-
好吧,显然不是我今天遇到的问题......