跳轉至

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;
    }
}
// Not supported
func checkGameCenterAuthenticationState(_ result: ResultAPI) {
    switch result.getCode() {
    /***** GameCenter驗證狀態碼 *****/
    case .authV4AppleCancel:
        // 請顯示可透過其他Provider登入的視窗。
        // 請呼叫AuthV4.helper.showGameCenterLoginCancelDialog API顯示Game Center取消提示。
        break
    case .authV4AppleLoginCancel:
        // 請呼叫AuthV4.helper.showGameCenterLoginCancelDialog API顯示Game Center取消提示。
        break
    case .authV4AppleResponseError:
        // 請檢查收到的錯誤訊息中的GameCenter錯誤值。
        break
    case .authV4AppleResponseFailLogin:
        // 網路不穩定,或GameCenter資訊與註冊資訊不一致時會發生此問題。
        // 如果上述資訊正確但錯誤仍持續發生,請附上收到的錯誤訊息聯絡HIVE。
        break
    default:
        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);
});
// Not supported
let score = ""
let leaderboardIdentifier = ""

ProviderApple.reportScore(score, leaderboardIdentifier: leaderboardIdentifier) { (result) in
    switch result.getCode() {
    case .authV4AppleResponseFailReportScore:
        // 此問題可能是暫時現象。如果持續發生,請附上收到的錯誤訊息聯絡HIVE。
        break
    // ...
    default:
        break
    }
    // 通用GameCenter使用者驗證狀態碼請參閱以下函式。
    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);
});
// Not supported
ProviderApple.showLeaderboard { (result) in
    switch result.getCode() {
    case .authV4AppleInProgressGameCenterVC:
        // GameCenter檢視已顯示時不會重複顯示。請關閉目前的檢視後重試。
        break
    // ...
    default:
        break
    }
    // 通用GameCenter使用者驗證狀態碼請參閱以下函式。
    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);
});
// Not supported
ProviderApple.loadAchievements { (result, achievements) in
    switch result.getCode() {
    case .authV4AppleResponseFailLoadAchievements:
        // 此問題可能是暫時現象。如果持續發生,請附上收到的錯誤訊息聯絡HIVE。
        break
    // ...
    default:
        break
    }
    // 通用GameCenter使用者驗證狀態碼請參閱以下函式。
    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);
});
// Not supported
let percent = "0"
let achievementIdentifier = ""
let showsCompletionBanner = true

ProviderApple.reportAchievement(percent, showsCompletionBanner: showsCompletionBanner, achievementIdentifier: achievementIdentifier) { (result) in
    switch result.getCode() {
    case .authV4AppleResponseFailLoadAchievements:
        // 此問題可能是暫時現象。如果持續發生,請附上收到的錯誤訊息聯絡HIVE。
        break
    // ...
    default:
        break
    }
    // 通用GameCenter使用者驗證狀態碼請參閱以下函式。
    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);
});
// Not supported
ProviderApple.showAchievements { (result) in
    switch result.getCode() {
    case .authV4AppleInProgressGameCenterVC:
        // GameCenter檢視已顯示時不會重複顯示。請關閉目前的檢視後重試。
        break
    // ...
    default:
        break
    }
    // 通用GameCenter使用者驗證狀態碼請參閱以下函式。
    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);
});
// Not supported
ProviderApple.resetAchievements { (result) in
    switch result.getCode() {
    case .authV4AppleResponseFailResetAchievements:
        // 此問題可能是暫時現象。如果持續發生,請附上收到的錯誤訊息聯絡HIVE。
        break
    // ...
    default:
        break
    }
    // 通用GameCenter使用者驗證狀態碼請參閱以下函式。
    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.