Game Center Achievement Issue
Asked Answered
A

3

16

I have recently decided to add achievements to a game that has been on the App Store for years now, and I'm having issues with making them work.

I am using the following code to post the achievements:

GKAchievement *achievement = [[GKAchievement alloc] initWithIdentifier: identifier];

[achievement setPercentComplete:100.0];

[GKAchievement reportAchievements:@[achievement] withCompletionHandler:^(NSError *error){

}];

But reportAchievements just logs no bundle for bundleID: (null).

I'm wondering if it has something to do with the fact that achievements aren't live yet and Apple has removed sandbox servers. But they are registered in iTunes Connect and I'm using a Test User.

It is also important to note that this app was transferred from a different developer.

For the app ID I tried using:

  • com.olddeveloper.ach_id
  • com.olddeveloper.appid.ach_id
  • ach_id
  • com.newdeveloper.ach_id
  • com.newdeveloper.appid.ach_id

The leaderboard that has been present since before the transfer is still working and it uses the old developer's ID.

I even tried just getting a list of all achievements using the code in the first answer here, but it still says no bundle for bundleID: (null).

EDIT:

I found that even though it says no bundle for bundleID: (null), it still correctly returns a list of all achievements. I assume that this message is just some glitch in the system and that it works anyway.

That said, I am still unable to make achievements unlock using any combination of ID.

Aeromechanic answered 16/10, 2015 at 19:26 Comment(0)
S
1

For me the problem was that the achievement was being unlocked, but not displaying. I don't know of any way to not display the message, but it is harmless.

Susann answered 30/12, 2015 at 1:4 Comment(1)
It doesn't show the achievement at all in the Game Center app. Apple's page on the removal of the testing servers they said that achievements and leaderboards will show when unlocked even if they aren't live yet.Aeromechanic
C
1

I faced the same issue. Stepping cautiously through my code in my debugger, I came to figure out if I use GKScore instead of GKAchievement , the warning message disappears. So thumb rule is check your achievements and leaderboards. Go with GKScore instead of GKAchievement.

[ GKAchievement reportAchievements:achievements withCompletionHandler:^(NSError *error) {
    if ( error != 0 )
        NSLog( @"Reporting of %@ failed: %@", achievement, [ error localizedDescription ] );
}];

You can also see the radar. It is with no. rdar://23149890

Conchita answered 30/12, 2015 at 10:44 Comment(0)
S
0

I received the same error message while accidentally trying to report an achievement within my app that was not configured in iTunes Connect.

So, the following steps might help you:

  1. Check iTunes Connect for missing achievements
  2. Check your achievement ids for spelling mistakes
Sungkiang answered 25/7, 2016 at 15:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.