質問編集履歴
1
コードを修正しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,28 +40,28 @@
|
|
40
40
|
|
41
41
|
-(void)score{
|
42
42
|
|
43
|
-
|
43
|
+
if ([GKLocalPlayer localPlayer].isAuthenticated) {
|
44
44
|
|
45
|
-
|
45
|
+
GKScore* score = [[GKScore alloc] initWithLeaderboardIdentifier:@"achievement"];
|
46
46
|
|
47
|
-
|
47
|
+
|
48
48
|
|
49
|
-
score
|
49
|
+
score.value = 100.0;
|
50
50
|
|
51
|
-
[
|
51
|
+
[GKScore reportScores:@[score] withCompletionHandler:^(NSError *error) {
|
52
52
|
|
53
|
-
if (error
|
53
|
+
if (error) {
|
54
54
|
|
55
|
-
{
|
56
|
-
|
57
|
-
//
|
55
|
+
// エラーの場合
|
58
|
-
|
59
|
-
NSLog(@"error %@",error);
|
60
56
|
|
61
57
|
}
|
62
58
|
|
63
59
|
}];
|
64
60
|
|
61
|
+
}
|
62
|
+
|
63
|
+
|
64
|
+
|
65
65
|
}
|
66
66
|
|
67
67
|
```
|