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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With