HIVE SDK for iOS

Classes | Typedefs | Functions
AuthV4Helper

Provides advanced features of HIVE Authentication. More...

Classes

class  HIVEConflictSingleViewInfo
 The class showing the conflicted account's game data when user accounts conflict
More...
 
class  HIVEAuthV4Helper
 Provides advanced features of HIVE Authentication. More...
 

Typedefs

typedef void(^ HIVEAuthV4HelperHandler) (HIVEResultAPI *result, HIVEPlayerInfo *playerInfo)
 AuthV4Helper API request result callback. More...
 

Functions

(void) - HIVEAuthV4Helper::syncAccount:handler:
 Helps to inform whether accounts conflict or not when executing the provided as well as other APIs. More...
 
(void) - HIVEAuthV4Helper::signIn:
 Player sign-in

Condition of use

  1. Complete to initialize HIVE SDK

    Key result code

More...
 
(void) - HIVEAuthV4Helper::signOut:
 Player sign-out

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

More...
 
(void) - HIVEAuthV4Helper::connect:handler:
 Provider Connection

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

More...
 
(void) - HIVEAuthV4Helper::disconnect:handler:
 Provider connetion

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

More...
 
(void) - HIVEAuthV4Helper::showLeaderboard:
 Queries leaderboard

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Refernce

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.
More...
 
(void) - HIVEAuthV4Helper::showAchievements:
 Queries Achievements

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Reference

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.
More...
 
(void) - HIVEAuthV4Helper::showGameCenterLoginCancelDialog:
 If a sign-in window of Game Center is not displayed, show its status
and display a UI to inform how to sign in the Game Center. More...
 
(void) - HIVEAuthV4Helper::showConflict:
 Displays conflict status, and HIVE UI avilable to select an account. More...
 
(void) - HIVEAuthV4Helper::showConflict:handler:
 Displays conflict status, and HIVE UI which is available to select an account as well as shows game information. More...
 
(void) - HIVEAuthV4Helper::switchAccount:
 If accounts conflict, sign out the current player
and try to sign in with the account signed in on the user device. More...
 
(void) - HIVEAuthV4Helper::resolveConflict:
 In case it is not changed the currently signed-in account after accounts conflict. More...
 
(NSArray *) - HIVEAuthV4Helper::getIDPList
 Receives the Provider lists sent by SDK. More...
 

Detailed Description

Provides advanced features of HIVE Authentication.



The detailed functions provided by this class are as follows.

Typedef Documentation

§ HIVEAuthV4HelperHandler

typedef void(^ HIVEAuthV4HelperHandler) (HIVEResultAPI *result, HIVEPlayerInfo *playerInfo)

AuthV4Helper API request result callback.

Parameters
resultErrorCodes and Codes available for result values are as follows.
ErrorCode Code Description
kHIVEResultAPITypeSUCCESS kSuccess Completed the request without account conflicts
kHIVEResultAPITypeNEED_INITIALIZE kAuthV4NotInitialized Not initialized the HIVE SDK
kHIVEResultAPITypeINVALID_SESSION kAuthV4SigninFirst Called the APIs required sign-in before sign-in
kHIVEResultAPITypeINVALID_PARAM kAuthV4AlreadyAuthorized Called sign-in API again after sign-in
kHIVEResultAPITypeCONFLICT_PLAYER kAuthV4ConflictPlayer The account signed in on user device is mismatched with the PGS/Game Center account on the game
or the player ID of the Provider to be connected already existed
kHIVEResultAPITypePLAYER_CHANGE kAuthV4PlayerChange Succeeded to change the player after accounts conflict
kHIVEResultAPITypeCANCELED kAuthV4PlayerResolved Not changed the currently signed-in account after accounts conflict
kHIVEResultAPITypeINVALID_SESSION kAuthV4HelperImplifiedLoginFail Required Explicit Login due to failure of Implicit Login
kHIVEResultAPITypeIN_PROGRESS kAuthV4InProgressSignIn
kAuthV4InProgressConnect
kAuthV4InProgressShowLeaderboard
kAuthV4InProgressShowAchievements
The request is still in progress
playerInfoPlayer information depending on results are as follows.
ErrorCode Code Player Info
kHIVEResultAPITypeSUCCESS kSuccess The information of signed-in player
kHIVEResultAPITypeCONFLICT_PLAYER kAuthV4ConflictPlayer The information of conflicted player
kHIVEResultAPITypePLAYER_CHANGE kAuthV4PlayerChange The information of the player who successfully changed its account
kHIVEResultAPITypeCANCELED kAuthV4PlayerResolved The information of current player
See also
HIVEResultAPI, HIVEPlayerInfo

Function Documentation

§ connect:handler:()

- (void) connect: (HIVEProviderType)  providerType
handler: (HIVEAuthV4HelperHandler handler 

Provider Connection

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

ErrorCode Code Description Solution
kHIVEResultAPITypeSUCCESS kSuccess Succeeded to conenct with Provider
-
kHIVEResultAPITypeNEED_INITIALIZE kAuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
kHIVEResultAPITypeCANCELED kAuthV4AppleLoginCancel If a sign-in window of Game Center is not displayed or the sign-in on Game Center is cancelled, use AuthV4.helper.showGameCenterLoginCancelDialog() API or implement directly to inform how to sign in the Game Center
kHIVEResultAPITypeCONFLICT_PLAYER kAuthV4ConflictPlayer the player ID of the Provider to be connected already existed
playerInfo: The information of conflicted account
Follow the resolution in accordance with the type of account conflicts
Parameters
handlerHIVEAuthV4HelperHandler AuthV4Helper Connect result callback

§ disconnect:handler:()

- (void) disconnect: (HIVEProviderType)  providerType
handler: (HIVEAuthV4HelperHandler handler 

Provider connetion

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

ErrorCode Code Description Solution
kHIVEResultAPITypeSUCCESS kSuccess Succeeded to discconect with Provider
-
kHIVEResultAPITypeNEED_INITIALIZE kAuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
kHIVEResultAPITypeINVALID_PARAM kAuthV4ProviderAlreadtDisconnected The Provider requested to disconnect was not connected with the account -
Parameters
handlerHIVEAuthV4HelperHandler AuthV4Helper Disconnect result callback

§ getIDPList()

- (NSArray *) getIDPList

Receives the Provider lists sent by SDK.



§ resolveConflict:()

- (void) resolveConflict: (HIVEAuthV4HelperHandler handler

In case it is not changed the currently signed-in account after accounts conflict.


Key result code

ErrorCode Code Description
kHIVEResultAPITypeCANCELED kAuthV4PlayerResolved Not changed the currently signed-in account after accounts conflict
Parameters
handlerHIVEAuthV4HelperHandler AuthV4Helper Resolve Conflict result callback

§ showAchievements:()

- (void) showAchievements: (HIVEAuthV4HelperHandler handler

Queries Achievements

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Reference

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.



Key result code

ErrorCode Code Description Solution
kHIVEResultAPITypeSUCCESS kSuccess Succeeded to request Acheivement
-
kHIVEResultAPITypeNEED_INITIALIZE kAuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
kHIVEResultAPITypeCANCELED kAuthV4AppleLoginCancel If a sign-in window of Game Center is not displayed or the sign-in on Game Center is cancelled, use AuthV4.helper.showGameCenterLoginCancelDialog() API or implement directly to inform how to sign in the Game Center
kHIVEResultAPITypeCONFLICT_PLAYER kAuthV4ConflictPlayer The account signed in on user device is mismatched with the PGS/Game Center account on the game
or the player ID of the Provider to be connected already existed
Follow the resolution in accordance with the type of account conflicts
Parameters
handlerHIVEAuthV4HelperHandler AuthV4Helper Show achievements result callback

§ showConflict:()

- (void) showConflict: (HIVEAuthV4HelperHandler handler

Displays conflict status, and HIVE UI avilable to select an account.

Key result code

ErrorCode Code Description
kHIVEResultAPITypePLAYER_CHANGE kAuthV4PlayerChange Succeeded to change the player after accounts conflict
kHIVEResultAPITypeCANCELED kAuthV4PlayerResolved Not changed the currently signed-in account after accounts conflict
kHIVEResultAPITypeINVALID_PARAM kAuthV4InvalidConflictInfo Requested to resolve account conflicts not happened
Parameters
handlerHIVEAuthV4HelperHandler AuthV4Helper Show Conflict result callback

§ showConflict:handler:()

- (void) showConflict: (HIVEConflictSingleViewInfo *)  conflictData
handler: (HIVEAuthV4HelperHandler handler 

Displays conflict status, and HIVE UI which is available to select an account as well as shows game information.


Key result code

ErrorCode Code Description
kHIVEResultAPITypePLAYER_CHANGE kAuthV4PlayerChange Succeeded to change the player after accounts conflict
kHIVEResultAPITypeCANCELED kAuthV4PlayerResolved Not changed the currently signed-in account after accounts conflict
kHIVEResultAPITypeINVALID_PARAM kAuthV4InvalidConflictInfo Requested to resolve account conflicts not happened
Parameters
conflictDataHIVEConflictSingleViewInfo Game information of the account-conflicted player
handlerHIVEAuthV4HelperHandler AuthV4Helper Show Conflict result callback
See also
HIVEConflictSingleViewInfo

§ showGameCenterLoginCancelDialog:()

- (void) showGameCenterLoginCancelDialog: (HIVEAuthV4DialogDismissHandler handler

If a sign-in window of Game Center is not displayed, show its status
and display a UI to inform how to sign in the Game Center.

Parameters
handlerHIVEAuthV4DialogDismissHandler callback whether account notification popup is closed or not
See also
HIVEAuthV4DialogDismissHandler

§ showLeaderboard:()

- (void) showLeaderboard: (HIVEAuthV4HelperHandler handler

Queries leaderboard

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Refernce

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.



Key result code

ErrorCode Code Description Solution
kHIVEResultAPITypeSUCCESS kSuccess Succeeded to request leaderboards
-
kHIVEResultAPITypeNEED_INITIALIZE kAuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
kHIVEResultAPITypeCANCELED kAuthV4AppleLoginCancel If a sign-in window of Game Center is not displayed or the sign-in on Game Center is cancelled, use AuthV4.helper.showGameCenterLoginCancelDialog() API or implement directly to inform how to sign in the Game Center
kHIVEResultAPITypeCONFLICT_PLAYER kAuthV4ConflictPlayer The account signed in on user device is mismatched with the PGS/Game Center account on the game
or the player ID of the Provider to be connected already existed
Follow the resolution in accordance with the type of account conflicts
Parameters
handlerHIVEAuthV4HelperHandler AuthV4Helper Show leaderboard result callback

§ signIn:()

- (void) signIn: (HIVEAuthV4HelperHandler handler

Player sign-in

Condition of use

  1. Complete to initialize HIVE SDK

    Key result code

ErrorCode Code Description Solution
kHIVEResultAPITypeSUCCESS kSuccess Succeeded to sign in
playerInfo: The information of signed-in player
-
kHIVEResultAPITypeNEED_INITIALIZE kAuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
kHIVEResultAPITypeIN_PROGRESS kAuthV4InProgressSignIn
Requested to process SignIn while sign-in is in progress Wait for the SignIn request in progress
kHIVEResultAPITypeCONFLICT_PLAYER kAuthV4ConflictPlayer The account signed in on user device is mismatched with the PGS/Game Center account on the game
or the player ID of the Provider to be connected already existed
playerInfo: The information of conflicted account
Follow the resolution in accordance with the type of account conflicts
kHIVEResultAPITypeINVALID_SESSION kAuthV4HelperImplifiedLoginFail Required Explicit Login due to failure of Implicit Login Query the supported Provider lists by calling AuthV4.Helper.getIDPList() and implement Explicit Login UI,
or implement Explicit Login by calling AuthV4.showSignIn() of HIVE UI
Parameters
handlerHIVEAuthV4HelperHandler AuthV4Helper Sign In result callback

§ signOut:()

- (void) signOut: (HIVEAuthV4HelperHandler handler

Player sign-out

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

ErrorCode Code Description Solution
kHIVEResultAPITypeSUCCESS kSuccess Succeeded to sign out
-
kHIVEResultAPITypeNEED_INITIALIZE kAuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
Parameters
handlerHIVEAuthV4HelperHandler AuthV4Helper Sign Out result callback

§ switchAccount:()

- (void) switchAccount: (HIVEAuthV4HelperHandler handler

If accounts conflict, sign out the current player
and try to sign in with the account signed in on the user device.


Key result code

ErrorCode Code Description
kHIVEResultAPITypePLAYER_CHANGE kAuthV4PlayerChange Succeeded to change the player after accounts conflict
Parameters
handlerHIVEAuthV4HelperHandler AuthV4Helper Switch Account result callback

§ syncAccount:handler:()

- (void) syncAccount: (HIVEProviderType)  providerType
handler: (HIVEAuthV4HelperHandler handler 

Helps to inform whether accounts conflict or not when executing the provided as well as other APIs.


Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

ErrorCode Code Description Solution
kHIVEResultAPITypeSUCCESS kSuccess Account normal state -
kHIVEResultAPITypeNEED_INITIALIZE kAuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
kHIVEResultAPITypeCONFLICT_PLAYER kAuthV4ConflictPlayer Mismatched the signed-in account with PGS/GameCenter account on the device Follow the resolution in accordance with the type of account conflicts
kHIVEResultAPITypeNOT_SUPPORTED kAuthV4NotSupportedProviderType Queried account state with other provider types except PGS/GameCenter -
Parameters
providerTypeProviderType to request syncronization
handlerHIVEAuthV4HelperHandler AuthV4Helper Sync Account result callback
Copyright © GAMEVIL COM2US PLATFORM Inc. All Right Reserved. Terms of Use Privacy Policy