Additional functions provided by Gamebase are described as below:
API
+ (NSString *)idfa;
[Caution]
For iOS 14 or later, user permission must be required when requesting the IDFA value. When asking for user permission, the text to prompt must be set in info.plist. Please set 'Privacy - Tracking Usage Description' in info.plist.
API
+ (NSString *)deviceLanguageCode;
Similar to the Maintenance popup, the language used by the device will be displayed as the Gamebase language.
However, there are games that may use a language different from the device language with separate options. For example, if the language configured for the device is English and you changed the game language to Japanese, the language displayed will be still English, even though you might want to see Japanese on the Gamebase screen.
For this, Gamebase provides a Display Language feature for applications that want to use a language that is not the language configured by the device for Gamebase.
Gamebase displays its messages in the language set in Display Language. The language code entered for Display Language should be one of the codes listed in the table (**Types of language codes supported by Gamebase) below:
[Caution]
- Use Display Language only when you want to change the language displayed in Gamebase to a language other than the one configured by the device.
- Display Language Code is a case-sensitive value in the form of ISO-639. There could be a problem if it is configured as a value such as 'EN' or 'zh-cn'.
- If the value entered for Display Language Code does not exist in the table below (Types of Language Codes Supported by Gamebase), Display Language Code is set to the default language set in the Gamebase console.
- If the language is not set in the Gamebase console, English (en) is set as the default language.
[Note]
- As the client messages of Gamebase include only English (en), Korean (ko), and Japanese (ja), if you try to set a language other than English (en), Korean (ko), or Japanese (ja), even though the language code might be listed in the table below, the value is automatically set to English (en) by default.
- You can manually add a language set that is not included in the Gamebase client. See the Add New Language Set section.
Code | Name |
---|---|
de | German |
en | English |
es | Spanish |
fi | Finnish |
fr | French |
id | Indonesian |
it | Italian |
ja | Japanese |
ko | Korean |
pt | Portuguese |
ru | Russian |
th | Thai |
vi | Vietnamese |
ms | Malay |
zh-CN | Chinese-Simplified |
zh-TW | Chinese-Traditional |
Each language code is defined in TCGBConstants.h
.
#pragma mark - DisplayLanguageCode
extern NSString* const kTCGBDisplayLanguageCodeGerman;
extern NSString* const kTCGBDisplayLanguageCodeEnglish;
extern NSString* const kTCGBDisplayLanguageCodeSpanish;
extern NSString* const kTCGBDisplayLanguageCodeFinnish;
extern NSString* const kTCGBDisplayLanguageCodeFrench;
extern NSString* const kTCGBDisplayLanguageCodeIndonesian;
extern NSString* const kTCGBDisplayLanguageCodeItalian;
extern NSString* const kTCGBDisplayLanguageCodeJapanese;
extern NSString* const kTCGBDisplayLanguageCodeKorean;
extern NSString* const kTCGBDisplayLanguageCodePortuguese;
extern NSString* const kTCGBDisplayLanguageCodeRussian;
extern NSString* const kTCGBDisplayLanguageCodeThai;
extern NSString* const kTCGBDisplayLanguageCodeVietnamese;
extern NSString* const kTCGBDisplayLanguageCodeMalay;
extern NSString* const kTCGBDisplayLanguageCodeChineseSimplified;
extern NSString* const kTCGBDisplayLanguageCodeChineseTraditional;
Display Language can be set when Gamebase is initialized.
API
+ (void)initializeWithConfiguration:(TCGBConfiguration *)configuration completion:(InitializeCompletion)completion;
Example
- (void)initializeWithDisplayLanguageConfiguration {
TCGBConfiguration* config = [TCGBConfiguration configurationWithAppID:@"your app(project) ID" appVersion:@"your app version"];
[config setDisplayLanguageCode:kTCGBDisplayLanguageCodeEnglish];
[TCGBGamebase initializeWithConfiguration:config completion:^(LaunchingInfo launchingData, TCGBError *error) {
if ([TCGBGamebase isSuccessWithError:error] == YES) {
NSLog(@"TCGBGamebase initialization is succeeded");
// Check status of you app.
// If status of app is maintenance or terminated service or etc, you must blocking UI and you should make user cannot log in your service.
// You can use [TCGBLaunching launchingStatus] method to check status of your app.
}
else {
NSLog(@"TCGBGamebase initialization is failed with error:[%@]", [error description]);
}
}];
}
You can change the initial setting of Display Language.
API
+ (void)setDisplayLanguageCode:(NSString *)languageCode;
Example
- (void)setDisplayLanguageCode {
[TCGBGamebase setDisplayLanguageCode:kTCGBDisplayLanguageCodeEnglish];
}
You can retrieve the current application of Display Language.
API
+ (NSString *)displayLanguageCode;
Example
- (void)getDisplayLanguageCode()
{
NSString* displayLanguage = [TCGBGamebase displayLanguageCode];
}
If you are using a language other than the default language provided by Gamebase (ko, en, ja, zh-CN, zh-TW, th), add a localizedstring.json file to Copy Bundle Resources
in the Xcode project.
The localizedstring.json has a format defined as below:
{
"en": {
"common_ok_button": "OK",
"common_cancel_button": "Cancel",
...
"launching_service_closed_title": "Service Closed"
},
"ko": {
"common_ok_button": "확인",
"common_cancel_button": "취소",
...
"launching_service_closed_title": "서비스 종료"
},
"ja": {
"common_ok_button": "確認",
"common_cancel_button": "キャンセル",
...
"launching_service_closed_title": "サービス終了"
},
"zh-CN": {
"common_ok_button": "确定",
"common_cancel_button": "取消",
...
"launching_service_closed_title": "关闭服务"
},
"zh-TW": {
"common_ok_button": "好",
"common_cancel_button": "取消",
...
"launching_service_closed_title": "服務關閉"
},
"th": {
"common_ok_button": "ยืนยัน",
"common_cancel_button": "ยกเลิก",
...
"launching_service_closed_title": "ปิดให้บริการ"
},
"de": {},
"es": {},
...
"ms": {}
}
If you need to add another language set, you can add a value in the form of "key":"value"
to the corresponding language code in the localizedstring.json file.
{
"en": {
"common_ok_button": "OK",
"common_cancel_button": "Cancel",
...
"launching_service_closed_title": "Service Closed"
},
...
"vi": {
"common_ok_button": "value",
"common_cancel_button": "value",
...
"launching_service_closed_title": "value"
},
"ms": {}
}
If Display Language is set via initialization and SetDisplayLanguageCode API, the final application may be different from what has been entered.
en
is set as the default value.API
+ (NSString *)deviceCountryCode;
API
+ (void)addEventHandler:(GamebaseEventHandler)handler;
+ (void)removeEventHandler:(GamebaseEventHandler)handler;
+ (void)removeAllEventHandler;
VO
@interface TCGBGamebaseEventMessage : NSObject <TCGBValueObject>
@property (nonatomic, strong, nonnull) NSString* category;
@property (nonatomic, strong, nullable) NSString* data;
@end
Example
- (void)eventHandler_addEventHandler {
void(^eventHandler)(TCGBGamebaseEventMessage *) = ^(TCGBGamebaseEventMessage * _Nonnull message) {
if ([message.category isEqualToString:kTCGBIdPRevoked] == YES) {
TCGBGamebaseEventIdPRevokedData* idPRevokedData = [TCGBGamebaseEventIdPRevokedData gamebaseEventIdPRevokedDataFromJsonString:message.data];
if (idPRevokedData != nil) {
//TODO: process idp revoked
}
} else if ([message.category isEqualToString:kTCGBLoggedOut] == YES) {
TCGBGamebaseEventLoggedOutData* loggedOutData = [TCGBGamebaseEventLoggedOutData gamebaseEventLoggedOutDataFromJsonString:message.data];
if (loggedOutData != nil) {
//TODO: process loggedOut
}
} else if ([message.category isEqualToString:kTCGBServerPushAppKickoutMessageReceived] == YES
|| [message.category isEqualToString:kTCGBServerPushAppKickout] == YES
|| [message.category isEqualToString:kTCGBServerPushTransferKickout] == YES) {
TCGBGamebaseEventServerPushData* serverPushData = [TCGBGamebaseEventServerPushData gamebaseEventServerPushDataFromJsonString:message.data];
if (serverPushData != nil) {
//TODO: process server push
}
} else if ([message.category isEqualToString:kTCGBObserverLaunching] == YES
|| [message.category isEqualToString:kTCGBObserverHeartbeat] == YES
|| [message.category isEqualToString:kTCGBObserverNetwork] == YES) {
TCGBGamebaseEventObserverData* observerData = [TCGBGamebaseEventObserverData gamebaseEventObserverDataFromJsonString:message.data];
if (observerData != nil) {
//TODO: process observer
}
} else if ([message.category isEqualToString:kTCGBPurchaseUpdated] == YES) {
} else if ([message.category isEqualToString:kTCGBPushReceivedMessage] == YES) {
} else if ([message.category isEqualToString:kTCGBPushClickMessage] == YES) {
} else if ([message.category isEqualToString:kTCGBPushClickAction] == YES) {
}
};
[TCGBGamebase addEventHandler:eventHandler];
}
Event type | GamebaseEventCategory | VO conversion method | Remarks |
---|---|---|---|
IdPRevoked | kTCGBIdPRevoked | [TCGBGamebaseEventIdPRevokedData gamebaseEventIdPRevokedDataFromJsonString:message.data] | - |
LoggedOut | kTCGBLoggedOut | [TCGBGamebaseEventLoggedOutData gamebaseEventLoggedOutDataFromJsonString:message.data] | - |
ServerPush | kTCGBServerPushAppKickoutMessageReceived kTCGBServerPushAppKickout kTCGBServerPushTransferKickout |
[TCGBGamebaseEventServerPushData gamebaseEventServerPushDataFromJsonString:message.data] | - |
Observer | kTCGBObserverLaunching kTCGBObserverHeartbeat kTCGBObserverNetwork |
[TCGBGamebaseEventObserverData gamebaseEventObserverDataFromJsonString:message.data] | - |
Purchase - Promotion payment | kTCGBPurchaseUpdated | [TCGBPurchasableReceipt purchasableReceiptFromJsonString:message.data] | - |
Push - Message received | kTCGBPushReceivedMessage | [TCGBPushMessage pushMessageFromJsonString:message.data] | - |
Push - Message clicked | kTCGBPushClickMessage | [TCGBPushMessage pushFromJsonString:message.data] | - |
Push - Action clicked | kTCGBPushClickAction | [TCGBPushMessage pushFromJsonString:message.data] | Operates when the RichMessage button is clicked. |
[Note]
This is an event that only occur when using the iOS Appleid login.
@interface TCGBGamebaseEventIdPRevokedData : NSObject <TCGBValueObject>
@property (nonatomic, assign) int64_t code;
@property (nonatomic, strong) NSString* idPType;
@property (nonatomic, strong) NSArray<NSString *>* authMappingList;
@property (nonatomic, strong) NSString* extras;
@end
Example
- (void)eventHandler_addEventHandler {
void(^eventHandler)(TCGBGamebaseEventMessage *) = ^(TCGBGamebaseEventMessage * _Nonnull message) {
if ([message.category isEqualToString:kTCGBIdPRevoked] == YES) {
TCGBGamebaseEventIdPRevokedData *idPRevokedData = [TCGBGamebaseEventIdPRevokedData gamebaseEventIdPRevokedDataFromJsonString:message.data];
if (idPRevokedData == nil) { return; }
NSString *revokedIdP = idPRevokedData.idPType;
switch (idPRevokedData.code) {
case IDP_REVOKED_WITHDRAW:
{
// The user is logged in with a revoked IdP, and there is no list of mapped IdPs.
// Notifies the user that the current account has been removed.
[TCGBGamebase withdrawWithViewController:nil completion:^(TCGBError *error) {
...
}];
break;
}
case IDP_REVOKED_OVERWRITE_LOGIN_AND_REMOVE_MAPPING:
{
// The user is logged in with a revoked IdP and IdPs other than the revoked IdP are mapped.
// Allows the user to select a IdP to log in to among the authMappingList, and remove mapping with the revoked IdP after login with the selected IdP.
NSString *selectedIdPType = "The IdP selected by the user";
NSMutableDictionary *additionalInfo = [NSMutableDictionary dictionary];
additionalInfo[kTCGBAuthLoginWithCredentialIgnoreAlreadyLoggedInKeyname] = @(YES);
[TCGBGamebase loginWithType:selectedIdPType additionalInfo:additionalInfo viewController:viewController completion:^(TCGBAuthToken *authToken, TCGBError *loginError) {
if ([TCGBGamebase isSuccessWithError:loginError]) {
[TCGBGamebase removeMappingWithType:revokedIdP viewController:nil completion:^(TCGBError * _Nullable removeMappingError) {
...
}];
}
}];
break;
}
case IDP_REVOKED_REMOVE_MAPPING:
{
// There is a revoked IdP among IdPs mapped to the current account.
// Notifies the user that mapping with the revoked IdP is removed from the current account.
[TCGBGamebase removeMappingWithType:revokedIdP viewController:nil completion:^(TCGBError *error) {
...
}];
break;
}
}
}
};
[TCGBGamebase addEventHandler:eventHandler];
}
Example
- (void)eventHandler_addEventHandler {
void(^eventHandler)(TCGBGamebaseEventMessage *) = ^(TCGBGamebaseEventMessage * _Nonnull message) {
[self printLogAndShowAlertWithData:[message prettyJsonString] error:nil alertTitle:@"addEventHandler Result"];
if ([message.category isEqualToString:kTCGBLoggedOut] == YES) {
TCGBGamebaseEventLoggedOutData* loggedOutData = [TCGBGamebaseEventLoggedOutData gamebaseEventLoggedOutDataFromJsonString:message.data];
if (loggedOutData != nil) {
//TODO: process loggedOut
}
}
};
[TCGBGamebase addEventHandler:eventHandler];
}
Example
- (void)eventHandler_addEventHandler {
void(^eventHandler)(TCGBGamebaseEventMessage *) = ^(TCGBGamebaseEventMessage * _Nonnull message) {
[self printLogAndShowAlertWithData:[message prettyJsonString] error:nil alertTitle:@"addEventHandler Result"];
if ([message.category isEqualToString:kTCGBServerPushAppKickoutMessageReceived] == YES) {
TCGBGamebaseEventServerPushData* serverPushData = [TCGBGamebaseEventServerPushData gamebaseEventServerPushDataFromJsonString:message.data];
if (serverPushData != nil) {
//TODO: process server push
}
} else if ([message.category isEqualToString:kTCGBServerPushAppKickout] == YES) {
TCGBGamebaseEventServerPushData* serverPushData = [TCGBGamebaseEventServerPushData gamebaseEventServerPushDataFromJsonString:message.data];
if (serverPushData != nil) {
//TODO: process server push
}
} else if ([message.category isEqualToString:kTCGBServerPushTransferKickout] == YES) {
TCGBGamebaseEventServerPushData* serverPushData = [TCGBGamebaseEventServerPushData gamebaseEventServerPushDataFromJsonString:message.data];
if (serverPushData != nil) {
//TODO: process server push
}
}
};
[TCGBGamebase addEventHandler:eventHandler];
}
VO
@interface TCGBGamebaseEventObserverData : NSObject <TCGBValueObject>
@property (nonatomic, assign) int64_t code;
@property (nonatomic, strong, nullable) NSString* message;
@property (nonatomic, strong, nullable) NSString* extras;
@end
Example
- (void)eventHandler_addEventHandler {
void(^eventHandler)(TCGBGamebaseEventMessage *) = ^(TCGBGamebaseEventMessage * _Nonnull message) {
if ([message.category isEqualToString:kTCGBObserverLaunching] == YES) {
TCGBGamebaseEventObserverData* observerData = [TCGBGamebaseEventObserverData gamebaseEventObserverDataFromJsonString:message.data];
if (observerData != nil) {
int launchingStatusCode = observerData.code;
NSString* launchingMessage = observerData.message;
switch (launchingStatusCode) {
case IN_SERVICE:
// Finished maintenance.
break;
case INSPECTING_SERVICE:
case INSPECTING_ALL_SERVICES:
// Under maintenance.
break;
...
}
}
}
else if ([message.category isEqualToString:kTCGBObserverHeartbeat] == YES) {
TCGBGamebaseEventObserverData* observerData = [TCGBGamebaseEventObserverData gamebaseEventObserverDataFromJsonString:message.data];
int errorCode = observerData.code;
switch (errorCode) {
case TCGB_ERROR_INVALID_MEMBER:
// You can check the invalid user session in here.
// ex) After transferred account to another device.
break;
case TCGB_ERROR_BANNED_MEMBER:
// You can check the banned user session in here.
break;
}
}
else if ([message.category isEqualToString:kTCGBObserverNetwork] == YES) {
TCGBGamebaseEventObserverData* observerData = [TCGBGamebaseEventObserverData gamebaseEventObserverDataFromJsonString:message.data];
NetworkStatus networkTypeCode = observerData.code;
// You can check the changed network status in here.
if (networkTypeCode == NotReachable || networkTypeCode == ReachabilityIsNotDefined) {
// Network disconnected.
} else {
// Network connected.
}
}
};
[TCGBGamebase addEventHandler:eventHandler];
}
Example
- (void)eventHandler_addEventHandler {
void(^eventHandler)(TCGBGamebaseEventMessage *) = ^(TCGBGamebaseEventMessage * _Nonnull message) {
TCGBPurchasableReceipt* receipt = [TCGBPurchasableReceipt purchasableReceiptFromJsonString:message.data];
if (receipt != nil) {
// If user purchase item from appstore promoting iap
// this event will be occurred.
}
};
[TCGBGamebase addEventHandler:eventHandler];
}
VO
@interface TCGBPushMessage : NSObject <TCGBValueObject>
@property (nonatomic, strong, nonnull) NSString* identifier;
@property (nonatomic, strong, nullable) NSString* title;
@property (nonatomic, strong, nullable) NSString* body;
@property (nonatomic, strong, nonnull) NSString* extras;
@end
Example
- (void)eventHandler_addEventHandler {
void(^eventHandler)(TCGBGamebaseEventMessage *) = ^(TCGBGamebaseEventMessage * _Nonnull message) {
if ([message.category isEqualToString:kTCGBPushReceivedMessage] == YES) {
TCGBPushMessage* pushMessage = [TCGBPushMessage pushMessageFromJsonString:message.data];
if (pusMessage != nil) {
//TODO: process
}
}
};
[TCGBGamebase addEventHandler:eventHandler];
}
Example
- (void)eventHandler_addEventHandler {
void(^eventHandler)(TCGBGamebaseEventMessage *) = ^(TCGBGamebaseEventMessage * _Nonnull message) {
if ([message.category isEqualToString:kTCGBPushClickMessage] == YES) {
TCGBPushMessage* pushMessage = [TCGBPushMessage pushMessageFromJsonString:message.data];
if (pusMessage != nil) {
//TODO: process
}
}
};
[TCGBGamebase addEventHandler:eventHandler];
}
VO
@interface TCGBPushAction : NSObject <TCGBValueObject>
@property (nonatomic, strong, nonnull) NSString* actionType;
@property (nonatomic, strong, nullable) TCGBPushMessage* message;
@property (nonatomic, strong, nullable) NSString* userText;
@end
Example
- (void)eventHandler_addEventHandler {
void(^eventHandler)(TCGBGamebaseEventMessage *) = ^(TCGBGamebaseEventMessage * _Nonnull message) {
if ([message.category isEqualToString:kTCGBPushClickAction] == YES) {
TCGBPushAction* pushMessage = [TCGBPushAction pushActionFromJsonString:message.data];
if (pushAction != nil) {
//TODO: process
}
}
};
[TCGBGamebase addEventHandler:eventHandler];
}
The game index can be transferred to the Gamebase server.
[Caution]
All APIs supported by the Gamebase Analytics can be called after login.
[TIP]
The index is transmitted automatically when payment is made by calling requestPurchaseWithItemSeq:viewController:completion API of TCGBPurchase or when promotion payment is made by calling setPromotionIAPHandler.
Please see the following guide for how to use Analytics console.
The game user level information can be transmitted as an index after logging in to the game.
[Caution]
If the SetGameUserData API is not called after login to the game, the level information may be missed from other indexes.
Parameters required for calling the API are as follows:
GameUserData
Name | Mandatory(M) / Optional(O) | Type | Desc |
---|---|---|---|
userLevel | M | int | This field represents game user's level. |
channelId | O | String | This field represents channel. |
characterId | O | String | This field represents character name. |
classId | O | String | This field represents class. |
API
+ (void)setGameUserData:(nonnull TCGBAnalyticsGameUserData *)gameUserData;
Example
- (void)setGameUserDataWithLevel:(int)level channelId:(NSString *)channelId characterId:(NSString *)characterId {
TCGBAnalyticsGameUserData* gameUserData = [TCGBAnalyticsGameUserData gameUserDataWithUserLevel:level];
[gameUserData setChannelId:channelId];
[gameUserData setCharacterId:characterId];
[TCGBAnalytics setGameUserData:gameUserData];
}
The game user level information can be transmitted as an index after leveling up.
Parameters required for calling the API are as follows:
LevelUpData
Name | Mandatory (M) / Optional (O) | Type | Desc |
---|---|---|---|
userLevel | M | int | This field represents game user's level. |
levelUpTime | M | long | Enter in Epoch time.The unit is milliseconds. |
API
+ (void)traceLevelUpWithLevelUpData:(nonnull TCGBAnalyticsLevelUpData *)levelUpData;
Example
- (void)traceLevelUpWith:(int)level levelUpTime:(long long)levelUpTime channelId:(NSString *)channelId characterId:(NSString *)characterId {
TCGBAnalyticsLevelUpData* levelUpData = [TCGBAnalyticsLevelUpData levelUpDataWithUserLevel:level levelUpTime:levelUpTime];
[TCGBAnalytics traceLevelUpWithLevelUpData:levelUpData];
}
Gamebase provides features to respond to customer inquiries.
[TIP]
Associate it with the NHN Cloud Contact service to easily respond to inquiries from customers. See the guide below if you want to know how to use the NHN Cloud Contact service in detail. NHN Cloud Online Contact Guide
In the Gamebase Console > App > InApp URL > Service Center, you can choose from three different types of Customer Centers.
Customer Service Type | Required Login |
---|---|
Developer customer center | X |
Gamebase customer center | △ |
NHN Cloud Online Contact | △ |
Gamebase SDK's Customer Center API uses the following URLs based on the type:
This feature is used to represent the Customer Center URL WebView entered in the Gamebase Console. You can pass the additional information to the URL using TCGBContactConfiguration.
TCGBContactConfiguration
Parameter | Mandatory(M) / Optional(O) |
Values | Description |
---|---|---|---|
userName | O | string | User name (nickname) default: nil |
additionalURL | O | string | Additional URL appended to the developer's own customer center URL Use it only if the customer center type is CUSTOM default: nil |
additionalParameters | O | dictionary<string, string> | Additional parameters appended to the contact center URL default: nil |
extraData | O | dictionary<string, string> | Passes the extra data wanted by the developer when opening the customer center default: nil |
API
+ (void)openContactWithViewController:(UIViewController *)viewController
completion:(void(^)(TCGBError *error))completion;
+ (void)openContactWithViewController:(UIViewController *)viewController
configuration:(TCGBContactConfiguration *)configuration
completion:(void(^)(TCGBError *error))completion;
Error Code
Error | Error Code | Description |
---|---|---|
TCGB_ERROR_NOT_INITIALIZED | 1 | Gamebase not initialized. |
TCGB_ERROR_UI_CONTACT_FAIL_INVALID_URL | 6911 | The Customer Center URL does not exist. Check the Customer Center URL of the Gamebase Console. |
TCGB_ERROR_UI_CONTACT_FAIL_ISSUE_SHORT_TERM_TICKET | 6912 | Failed to issue a temporary ticket for user identification. |
Example
[TCGBContact openContactWithViewController:self completion:^(TCGBError *error) {
if ([TCGBGamebase isSuccessWithError:error] == YES) {
// A user close the contact web view.
} else if (error.code == TCGB_ERROR_UI_CONTACT_FAIL_INVALID_URL) {
// TODO: Gamebase Console Service Center URL is invalid.
// Please check the url field in the TOAST Gamebase Console.
} else {
// TODO: Error occur when opening the contact web view.
}
}];
[Caution]
When contacting the Customer Center, access to camera or album may be required for file attachment. Please set 'Privacy - Camera Usage Description', 'Privacy - Microphone Library Usage Description' in info.plist.
Can get the URL used for displaying the Customer Center WebView.
API
+ (void)requestContactURLWithCompletion:(void(^)(NSString *contactUrl, TCGBError *error))completion;
+ (void)requestContactURLWithConfiguration:(TCGBContactConfiguration *)configuration
completion:(void(^)(NSString *contactUrl, TCGBError *error))completion;
Error Code
Error | Error Code | Description |
---|---|---|
TCGB_ERROR_NOT_INITIALIZED | 1 | Gamebase not initialized. |
TCGB_ERROR_UI_CONTACT_FAIL_INVALID_URL | 6911 | The Customer Center URL does not exist. Check the Customer Center URL of the Gamebase Console. |
TCGB_ERROR_UI_CONTACT_FAIL_ISSUE_SHORT_TERM_TICKET | 6912 | Failed to issue a temporary ticket for user identification. |
Example
[TCGBContact requestContactURLWithCompletion^(NSString *contactUrl, TCGBError *error){
if ([TCGBGamebase isSuccessWithError:error] == YES) {
NSLog(@"ContactURL : %@", contactUrl);
} else if (error.code == TCGB_ERROR_UI_CONTACT_FAIL_INVALID_URL) {
// TODO: Gamebase Console Service Center URL is invalid.
// Please check the url field in the TOAST Gamebase Console.
} else {
// TODO: Error occur when request contact url.
}
}];