mao
mao

Reputation: 1077

iOS Game Center moving leaderboard and achievements to a group for 2 games

I have an existing paid iOS and app and I want to release a free version. The paid version has a leaderboard and several achievements that have been in use for months, if I try moving these into a group I get these errors:

Note: A leaderboard with this ID already exists - for the leaderboard Note: An achievement with this ID already exists - for a few achievements

There are no duplicate ID's, why is this happening? If I change their names I will have to release an update for the paid app to reflect the new ID's, is that correct?

Is there an easy way to approach this so paid app users and free app users can use the same leaderboard and achievements without having to update the paid app?

Advice would be great, thanks

Upvotes: 1

Views: 2399

Answers (2)

Jason Medeiros
Jason Medeiros

Reputation: 5428

I ran into the issue where I was creating a group and moving all my Leaderboards and Achievements into it, but App Store Connect would complain with:

Note: A leaderboard with ID "grp.foo" already exists.

After scouring the web, combing through Apple's documentation and WWDC videos, and contacting Apple's support, I eventually stumbled on a solution.

I guessed that the new Group IDs might have to be globally unique, not just unique to your app or group. My IDs had simple names like bestScore. So I prepended my group IDs with something like grp.companyname.groupname instead of just grp. After that I was able to proceed to the confirmation page without error. The final "Submit" can take some time to complete – I guess it's doing some copying.

Upvotes: 0

thomsky
thomsky

Reputation: 81

You are asking multiple questions, I shall try to answer some of them:

First "If I change their names I will have to release an update for the paid app to reflect the new ID's, is that correct?" It depends on how you put together your category string for the Game Center score reporter. If you can dynamically change the string (via server query) then I guess you won't have to update your app. But normally when you successfully copy an existing leaderboard into a new group that new grouped leaderboard's category string then is required to have the prefix "grp."

The fact is that 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 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.

Second "Is there an easy way to approach this so paid app users and free app users can use the same leaderboard and achievements without having to update the paid app?" See first answer, but you must always plan ahead. Before you release the first build of your game you should know if there can ever be mods that contribute to the same leaderboard. Just remember that a leaderboard can only ever be in one 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

Upvotes: 1

Related Questions