leecrossley / cordova-plugin-game-center

Cordova / PhoneGap Game Center Plugin for Apache Cordova >= 3.0.0
http://ilee.co.uk
78 stars 29 forks source link

submitScore Success and Error callbacks are never triggered. #2

Closed zeligmanos closed 10 years ago

zeligmanos commented 10 years ago

The plugin works like a charm except for the fact that the callback events when a score is submitted are never triggered. The score is submitted but it would nice to know if the score has been submitted for sure or not.

I tested your plugin both on XCode iOS 7 and iOS 6 emulators as well as on an iPhone 4 device on iOS 7.

leecrossley commented 10 years ago

You're right, I've been treating score submission as a "fire and forget". I'll look into making this more robust - thanks.

leecrossley commented 10 years ago

I think I've just fixed this in version 0.2.1 (just committed now with limited testing) a07a9fa2e7d1fe0c5e52a38111f17970157eefe0

zeligmanos commented 10 years ago

thanx for the faster than the speed of light fix!

tested it and I confirm that the success callback is triggered fine - couldn't figure out a way to trigger the error callback - switched off internet connection and tried to submit score and it still returned "success" and I think this is by design, cause in the first occasion that the device goes online, the score was submitted.

leecrossley commented 10 years ago

That's right, it is difficult to test but not being able to break it is a good thing :) I'll have a go and see if I can force an error.

leecrossley commented 10 years ago

Perhaps try and submit a score when not authenticated, to a leaderboardId that does not exist or a score in a bad format?

zeligmanos commented 10 years ago

thanx I'll give it a try