/
iOS Client SDK API

iOS Client SDK API


Initialization and Status Change Event Processing


App Event Method Initialization (iOS Only)

import KakaoGame @main class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? override init() { KGTApplication.setSwizzleAppDelegate(delegate: AppDelegate.description()) } }

SDK Initialization

import KakaoGame /** * When using a single app */ let config = KGTConfig(appId: "909428", appSecret: "c3c38bbfa3828b342d946e9770c974d0", appVersion: "1.0.0", market: "appStore", ageRating: "14", serverType: .QA, logLevel: .Verbose) /** * When using an app group */ let apps: [String : String] = [ "909428" : "c3c38bbfa3828b342d946e9770c974d0", "921478" : "5891c32124ca35821890a0bc1cec77a5"] let config = KGTConfig(appGroupId: "tubeAppGroup", apps: apps, appVersion: "1.0.0", market: "appStore", ageRating: "14", serverType: .QA, logLevel: .Verbose) KGTApplication.initSDK(config)

Start

import KakaoGame KGTApplication.start { error in if error.isSuccess { // If the start is successful // Check if auto-login is enabled let isLoggedIn = KGTPlayer.isLoggedIn if isLoggedIn { // The current Player's ID issued by the platform let playerId = KGTPlayer.currentPlayer?.playerId // Platform access token let accessToken = KGTPlayer.accessToken // Retrieve the current IDP authentication information let idpProfile = KGTPlayer.currentPlayer?.idpProfile // [TODO] Move to the game screen. } else { // [TODO] If auto-login is not enabled, move to the login screen. } } else { //If the start fails - since initialization failed, retry the start or close the app. if error.code == KGTErrorCode.networkFailure || error.code == KGTErrorCode.serverTimeout || error.code == KGTErrorCode.serverConnectionFalied { // [TODO] If a network error occurs, notify the user that the start failed due to a network issue and retry. } else { // [TODO] If other errors occur, provide an error notification and request a retry of the start process. - If the issue persists, check the error code and logs to determine the cause. } } }

Pause

Resume

Login


Logging In Without Using the Default Login UI

Logout


Logging Out Without Using the Default Logout UI

Unregistration


Unregistering Without Using the Default Unregistration UI

Account Linking


Linking Accounts Without Using the Default Account Linking UI

Profile


Retrieve My Information

Retrieve My IDP Information

System Information


Retrieve Language Code

Retrieve Country Code

Retrieve IP-based Country Code

Retrieve Device ID

Retrieve Device Model

Retrieve OS Name

Retrieve Network Connection Status

Retrieve Connected Network Type

Kakao Integration Feature


Setting Up KakaoTalk Game Message Reception

Retrieve KakaoTalk Profile

Retrieve KakaoTalk Game Friend List

Sending KakaoTalk Game Messages

Sending KakaoTalk Friend Invitation Messages

Adding a KakaoTalk Channel

Retrieve the list of friends to whom I sent an invite message

Retrieve the count of friends to whom I sent an invite message

Related content

Initialization and Status Change Event Processing SDK Example
Initialization and Status Change Event Processing SDK Example
More like this
1.1. Initialization and Status Change Processing example
1.1. Initialization and Status Change Processing example
More like this