Result API ProviderApple
Book Mark
| GameCenter status code | reportScore | showLeaderboard | loadAchievements | reportAchievement |
|---|---|---|---|---|
| showAchievements | resetAchievements |
GameCenter authentication result status code¶
void checkGameCenterAuthenticationState(ResultAPI result) {
switch(result.code) {
/***** GameCenter authentication status code *****/
case ResultAPI.Code.AuthV4AppleCancel:
// Display a login window that allows the user to log in through another provider.
// Call the AuthV4.helper.showGameCenterLoginCancelDialog API to show the Game Center cancellation message.
break;
case ResultAPI.Code.AuthV4AppleLoginCancel:
// Call the AuthV4.helper.showGameCenterLoginCancelDialog API to show the Game Center cancellation message.
break;
case ResultAPI.Code.AuthV4AppleResponseError:
// Check the GameCenter error value in the received error message.
break;
case ResultAPI.Code.AuthV4AppleResponseFailLogin:
// This occurs because the network is unstable or the GameCenter information does not match the registered information.
// If errors persist even though the above information is correct, contact HIVE with the received error message.
break;
}
}
void checkGameCenterAuthenticationState(ResultAPI const & result) {
switch(result.code) {
/***** GameCenter authentication status code *****/
case ResultAPI::Code::AuthV4AppleCancel:
// Please expose a login window that allows the user to log in through another provider.
// Call the AuthV4.helper.showGameCenterLoginCancelDialog API to display the Game Center cancellation message.
break;
case ResultAPI::Code::AuthV4AppleLoginCancel:
// Call the AuthV4.helper.showGameCenterLoginCancelDialog API to display the Game Center cancellation message.
break;
case ResultAPI::Code::AuthV4AppleResponseError:
// Check the GameCenter error value in the received error message.
break;
case ResultAPI::Code::AuthV4AppleResponseFailLogin:
// This occurs due to unstable network conditions or discrepancies with the registered GameCenter information.
// If errors continue to occur despite the above information being correct, please contact HIVE with the received error message.
break;
}
}
switch(result.code) {
/***** GameCenter authentication status code *****/
case kAuthV4AppleCancel:
// Please show a login window that allows the user to log in through another provider.
// Call the AuthV4.helper.showGameCenterLoginCancelDialog API to display the Game Center cancellation message.
break;
case kAuthV4AppleLoginCancel:
// Call the AuthV4.helper.showGameCenterLoginCancelDialog API to display the Game Center cancellation message.
break;
case kAuthV4AppleResponseError:
// Check the GameCenter error values in the received error message.
break;
case kAuthV4AppleResponseFailLogin:
// This occurs due to unstable network conditions or discrepancies with the registered GameCenter information.
// If errors continue to occur despite the above information being correct, please contact HIVE with the received error message.
break;
}
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) AuthV4AppleCancel | [Apple Provider] The user has canceled the GameCenter login. | Please display a login window that allows the user to log in through another provider. Call the AuthV4.helper.showGameCenterLoginCancelDialog API to show the Game Center cancellation message. |
| (Required implementation) AuthV4AppleLoginCancel | [Apple Provider] The user has already canceled the GameCenter login. | Call the AuthV4.helper.showGameCenterLoginCancelDialog API to show the Game Center cancellation message. |
| (Required implementation) AuthV4AppleResponseError | [Apple Provider] An error occurred during the GameCenter login process. | Check the GameCenter error value in the received error message. GKErrorCode |
| (Required implementation) AuthV4AppleResponseFailLogin | [Apple Provider] Failed to retrieve token information from the GameCenter server. | This occurs due to unstable network conditions or discrepancies with the registered GameCenter information. If errors persist despite the above information being correct, please contact HIVE with the received error message. |
ProviderApple.reportScore¶
String score = "";
String leaderboardIdentifier = "";
ProviderApple.reportScore(score, leaderboardIdentifier, (ResultAPI result) => {
switch(result.code) {
case ResultAPI.Code.AuthV4AppleResponseFailReportScore:
// This issue may be temporary. If the error continues to occur, contact HIVE with the error message.
break;
...
}
// For common GameCenter authentication status codes, check the function below.
checkGameCenterAuthenticationState(result);
});
std::string score = "";
std::string leaderboardIdentifier = "";
ProviderApple::reportScore(score, leaderboardIdentifier, [](ResultAPI const & result){
switch(result.code) {
case ResultAPI::Code::AuthV4AppleResponseFailReportScore:
// This issue may occur due to a temporary phenomenon. If this error persists, please contact HIVE with the error message.
break;
...
}
// Please check the function below for common GameCenter authentication status codes.
checkGameCenterAuthenticationState(result);
});
NSString *score = @"";
NSString *leaderboardIdentifier = @"";
[HIVEProviderApple reportScore:score leaderboardIdentifier:leaderboardIdentifier handler:^(HIVEResultAPI *result) {
switch (result.code) {
case kAuthV4AppleResponseFailReportScore:
// This issue may occur due to a temporary phenomenon. If this error persists, please contact HIVE with the error message.
break;
//...
}
// Please check the common GameCenter authentication status codes in the function below.
[self checkGameCenterAuthenticationState:result];
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) AuthV4AppleResponseFailReportScore | An error occurred while requesting a GameCenter feature. | This issue may be temporary. If the error continues to occur, contact HIVE with the error message. |
| GameCenter authentication result status code | If there is no authentication information in GameCenter, GameCenter authentication is attempted. If a problem occurs during this process, an error is delivered. | Refer to the GameCenter authentication result status code table above to guide GameCenter authentication. |
ProviderApple.showLeaderboard¶
ProviderApple.showLeaderboard((ResultAPI result) => {
switch(result.code) {
case ResultAPI.Code.AuthV4AppleInProgressGameCenterVC:
// If the GameCenter view is already displayed, it will not be displayed again. Close the currently displayed view and try again.
break;
...
}
// For common GameCenter authentication status codes, check the function below.
checkGameCenterAuthenticationState(result);
});
ProviderApple::showLeaderboard([](ResultAPI const & result){
switch(result.code) {
case ResultAPI::Code::AuthV4AppleInProgressGameCenterVC:
// If the GameCenter view is already displayed, it will not be displayed again. Close the currently displayed view and try again.
break;
...
}
// For common GameCenter authentication status codes, check the function below.
checkGameCenterAuthenticationState(result);
});
[HIVEProviderApple showLeaderboard:^(HIVEResultAPI *result) {
switch (result.code) {
case kAuthV4AppleInProgressGameCenterVC:
// If the GameCenter view is already displayed, it will not be displayed again. Close the currently displayed view and try again.
break;
//...
}
// For common GameCenter authentication status codes, check the function below.
[self checkGameCenterAuthenticationState:result];
}];
| Code | Message | How to solve |
|---|---|---|
| (Required Implementation) AuthV4AppleInProgressGameCenterVC | The GameCenter view is already being displayed. | If the GameCenter view is already being displayed, it will not be displayed again. Please close the previously displayed view and try again. |
| GameCenter Authentication Result Status Code | If there is no authentication information in GameCenter, an authentication attempt will be made. If there is an issue during this process, an error will be communicated. | Please refer to the GameCenter Authentication Result Status Code Table above to guide the GameCenter authentication process. |
ProviderApple.loadAchievements¶
ProviderApple.loadAchievements((ResultAPI result, List<ProviderApple.Achievement> achievementList) => {
switch(result.code){
case ResultAPI.Code.AuthV4AppleResponseFailLoadAchievements:
// This issue may occur due to a temporary phenomenon. If this error persists, please contact HIVE with the error message.
break;
...
}
// Please check the common GameCenter authentication status codes in the function below.
checkGameCenterAuthenticationState(result);
});
ProviderApple::loadAchievements([](ResultAPI const & result, std::vector<ProviderAppleAchievement> const & achievements){
switch(result.code){
case ResultAPI::Code::AuthV4AppleResponseFailLoadAchievements:
// This issue may occur due to a temporary phenomenon. If this error persists, please contact HIVE with the error message.
break;
...
}
// Please check the function below for common GameCenter authentication status codes.
checkGameCenterAuthenticationState(result);
});
[HIVEProviderApple loadAchievements:^(HIVEResultAPI *result, NSArray<HIVEProviderAppleAchievement *> *achievements) {
switch (result.code) {
case kAuthV4AppleResponseFailLoadAchievements:
// This issue may be temporary. If the error continues to occur, contact HIVE with the error message.
break;
//...
}
// For common GameCenter authentication status codes, check the function below.
[self checkGameCenterAuthenticationState:result];
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) AuthV4AppleResponseFailLoadAchievements | An error occurred while requesting a GameCenter feature. | This issue may be temporary. If the error continues to occur, contact HIVE with the error message. |
| GameCenter authentication result status code | If there is no authentication information in GameCenter, GameCenter authentication is attempted. If a problem occurs during this process, an error is delivered. | Refer to the GameCenter authentication result status code table above to guide GameCenter authentication. |
ProviderApple.reportAchievement¶
String percent = "0";
String achievementIdentifier = "";
Boolean showsCompletionBanner = true;
ProviderApple.reportAchievement(percent, showsCompletionBanner, achievementIdentifier, (ResultAPI result) => {
switch(result.code){
case ResultAPI.Code.AuthV4AppleResponseFailLoadAchievements:
// This issue may occur temporarily. If this error persists, please contact HIVE with the error message.
break;
...
}
// Please check the common GameCenter authentication status codes in the function below.
checkGameCenterAuthenticationState(result);
});
std::string percent = "0";
std::string achievementIdentifier = "";
bool showsCompletionBanner = true;
ProviderApple::reportAchievement(percent, showsCompletionBanner, achievementIdentifier, [](ResultAPI const & result){
switch(result.code){
case ResultAPI::Code::AuthV4AppleResponseFailLoadAchievements:
// This issue may be temporary. If the error continues to occur, contact HIVE with the error message.
break;
...
}
// For common GameCenter authentication status codes, check the function below.
checkGameCenterAuthenticationState(result);
});
NSString *percent = @"0";
NSString *achievementIdentifier = @"";
BOOL showCompletionBanner = YES;
[HIVEProviderApple reportAchievement:percent showsCompletionBanner:showCompletionBanner achievementIdentifier:achievementIdentifier handler:^(HIVEResultAPI *result) {
switch (result.code) {
case kAuthV4AppleResponseFailLoadAchievements:
// This issue may be temporary. If the error continues to occur, contact HIVE with the error message.
break;
//...
}
// For common GameCenter authentication status codes, check the function below.
[self checkGameCenterAuthenticationState:result];
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) AuthV4AppleResponseFailReportAchievements | An error occurred while requesting a GameCenter feature. | This issue may be temporary. If the error continues to occur, contact HIVE with the error message. |
| GameCenter authentication result status code | If there is no authentication information in GameCenter, GameCenter authentication is attempted. If a problem occurs during this process, an error is delivered. | Refer to the GameCenter authentication result status code table above to guide GameCenter authentication. |
ProviderApple.showAchievements¶
ProviderApple.showAchievements((ResultAPI result) => {
switch(result.code){
case ResultAPI.Code.AuthV4AppleInProgressGameCenterVC:
// If the GameCenter view is already displayed, it will not be displayed again. Close the currently displayed view and try again.
break;
...
}
// For common GameCenter authentication status codes, check the function below.
checkGameCenterAuthenticationState(result);
});
ProviderApple::showAchievements([](ResultAPI const & result){
switch(result.code){
case ResultAPI::Code::AuthV4AppleInProgressGameCenterVC:
// If the GameCenter view is already displayed, it will not be displayed again. Close the currently displayed view and try again.
break;
...
}
// For common GameCenter authentication status codes, check the function below.
checkGameCenterAuthenticationState(result);
});
[HIVEProviderApple showAchievements:^(HIVEResultAPI *result) {
switch (result.code) {
case kAuthV4AppleInProgressGameCenterVC:
// If the GameCenter view is already displayed, it will not be displayed again. Close the currently displayed view and try again.
break;
//...
}
// For common GameCenter authentication status codes, check the function below.
[self checkGameCenterAuthenticationState:result];
}];
| Code | Message | How to solve |
|---|---|---|
| AuthV4AppleInProgressGameCenterVC | GameCenter view is already being displayed. | If the GameCenter view is already being displayed, it will not be displayed again. Please close the previously displayed view and try again. |
| GameCenter authentication result status code | If there is no authentication information in GameCenter, an attempt will be made to authenticate with GameCenter. If there is a problem during this process, an error will be communicated. | Please refer to the GameCenter authentication result status code table above for guidance on proceeding with GameCenter authentication. |
ProviderApple.resetAchievements¶
ProviderApple.resetAchievements((ResultAPI result) => {
switch(result.code){
case ResultAPI.Code.AuthV4AppleResponseFailResetAchievements:
// This issue may be temporary. If the error continues to occur, contact HIVE with the error message.
break;
...
}
// For common GameCenter authentication status codes, check the function below.
checkGameCenterAuthenticationState(result);
});
ProviderApple::resetAchievements([](ResultAPI const & result){
switch(result.code){
case ResultAPI::Code::AuthV4AppleResponseFailResetAchievements:
// This issue may be temporary. If the error continues to occur, contact HIVE with the error message.
break;
...
}
// For common GameCenter authentication status codes, check the function below.
checkGameCenterAuthenticationState(result);
});
[HIVEProviderApple resetAchievements:^(HIVEResultAPI *result) {
switch (result.code) {
case kAuthV4AppleResponseFailResetAchievements:
// This issue may be temporary. If the error continues to occur, contact HIVE with the error message.
break;
//...
}
// For common GameCenter authentication status codes, check the function below.
[self checkGameCenterAuthenticationState:result];
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) AuthV4AppleResponseFailResetAchievements | An error occurred while requesting a GameCenter feature. | This issue may be temporary. If the error continues to occur, contact HIVE with the error message. |
| GameCenter authentication result status code | If there is no authentication information in GameCenter, GameCenter authentication is attempted. If a problem occurs during this process, an error is delivered. | Refer to the GameCenter authentication result status code table above to guide GameCenter authentication. |