iOS Game Center Group
Asked Answered
P

4

9

When I use Group Leaderboard in Game Center do I need to use "grp" prefix in id's enumerated in my app?
In other words if I will set up my existing game to use Group Leaderboard do I need to add "grp" prefix to each id in my app?

Pallua answered 20/7, 2012 at 8:30 Comment(0)
P
7

Okay, it works. You can move existing leaderboard to Group without performing any changes in application.

Hope that I do not break NDA, did not find any information about it, except this link - http://david-smith.org/blog/2012/06/18/ios-6-nda-cheatsheet/

Pallua answered 22/8, 2012 at 8:56 Comment(4)
so even if the achievement ID goes from testID to grp.testID, submitting the achievement with testID still works? Can you please confirm this for me ?Konstanze
Hi Kaan Dedeoglu, I'm not sure that I clearly understand you. In my situation I already had game with achievements, for example with testID. Then I put my leaderboard into group and achievement id was changed to grp.testID and all continue to be worked. If you want to add new achievement id to leaderboard which already in group, I think it is possible and achievement id would be once with grp prefix. P.S. sorry for my English :-)Pallua
you got my question correctly :) and the answer is sufficient - I don't have to redefine my constant, thanksKonstanze
I read this thread and i have one wired issue. After moving 2 app - free and paid app to group. There are grp prefix for all achievements. And is working fine with free app. But in paid app when i report achievement with new identifer(i.e.with grp prefix). it shows successfully reported. But when i try to load achievements which are reported already it shows early identifiers without grp prefix and it is happening only with paid app. And yes in all ios version same thing happens but in ios6 shared achievements get reflect where as in ios7 paid app is not showing any achievements in game centerVeator
G
2

Sorry if I've read your question incorrectly. But I believe the answer is yes.

I use a group leaderboard in my game and I submit a score as such.

            #define LeaderboardID @"grp.yourleaderboardname"

            GKScore *scoreReporter = [[GKScore alloc] initWithCategory:LeaderboardID];
            scoreReporter.value = yourscore;
            [scoreReporter reportScoreWithCompletionHandler:^(NSError *error) {
                if (error != nil) {  
                     NSLog(@"%@", error);
                } else {
                     NSLog(@"%@", @"Success submitting score");
                }
            }];
            [scoreReporter release]; 

Previous games that did not use group leaderboards my LeaderboardID was defined as such.

#define LeaderboardID @"com.yourcomapny.yourgame.yourleaderboardname"

So I believe you do have to change your id's to include the grp prefix.

Genovera answered 26/7, 2012 at 18:45 Comment(0)
B
1

the answer is Yes, you do have to change to the "grp." prefix. Here is why zakhej may have thought why he found the answer:

When, for example, you put a single leaderboard into a group, that single leaderboard will continue to exist. If you continue to report scores with your original category ID you will add them to the original single leaderboard, whereas using the 'grp.' prefix will add them to the new grouped one, which is essentially what you want to do. In short, putting a leaderboard in a group will result in there being two leaderboards, each getting updated with its own category ID.

Therefore it may seem that the original category ID will continue to work, but then you are looking at the old single leaderboard. This is why you might notice that sometimes the old category ID updates scores and sometimes it doesn't.

It took quite some time to figure this out, but Apple itunes Connect support explained it that way and it makes sense. Players who don't update the game will continue to report scores to an old leaderboard and will see that in game center. When they update later on they might get surprised to see their high score is a previous one from when you -the developer- added that leaderboard to the group.

This document is very helpful in planning Game Center implementations: https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnectGameCenter_Guide/iTunesConnectGameCenter_Guide.pdf

Branen answered 16/1, 2014 at 21:34 Comment(0)
P
0

There were 2 different and opposite answers to this question so I thought I would express how my own experience turned out:

TL;DR Don't add the grp. prefix.

  • Had leaderboards on an app, no Game Center Group. The app was live
  • Using GKGameCenterViewController for displaying the top scores worked fine
  • While the app was live I created a new Game Center Group and added it to it
  • Changed the leaderboards ids to have the new id as shown on the group, i.e. with the grp. prefix
  • I was able to post scores to the leaderboards, but when launching GKGameCenterViewController it didn't open on the leaderboards I instantiated it with, it only opened on the dashboard, as if it couldn't recognise the ids anymore.
  • Changed back the leaderboards ids to be the original ones (without grp.) and now I was able to post scores again, and to use GKGameCenterViewController as expected.

Conclusion: You can change the id to the new one with grp. to post scores or not, the result is the same, but GKGameCenterViewController only works if you use the original id.

Pyrope answered 22/4, 2021 at 8:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.