iOS SDK Installation
- 1 1. Execution Environment
- 2 2. SDK File Composition
- 3 3. SDK Installation
- 3.1 3.1. Adding Kakao Game SDK via Cocoapods
- 3.2 3.2. Adding the Kakao Game SDK (zip package)
- 3.3 3.3. Setting Other Linker Flags
- 3.4 3.4. Setting Kakao Game SDK Properties
- 3.5 3.5. Adding URLScheme
- 3.6 3.6. Setting LSApplicationQueriesSchemes
- 3.7 3.7.1. Setting Access Permissions
- 3.8 3.7.2. Setting Access Permissions Localization
- 3.9 3.8. Game Supported Language Resources
- 3.10 3.9 (Reference) Guide on Supporting Multiple Bundle IDs
- 3.11 3.10 Guide on SceneDelegate
1. Execution Environment
IDE : Xcode 15.0 or higher.
iOS : iOS 13.0 or higher.
2. SDK File Composition
KakaoGameFramework Folder
Contains the Kakao Game SDK framework and resource bundles.
IDPFramework Folder
Includes IDP framework related to Kakao.
External Library Versions
Kakao
KakaoSDK Version : 2.22.1
3. SDK Installation
This section explains the process of installing the SDK into an Xcode project with examples.
3.1. Adding Kakao Game SDK via Cocoapods
Open a new terminal window and navigate to the location of your Xcode project.
Open the Podfile and write the content referenced below. Use the specific lines based on the case.
full package installation (including Firebase)
iOS cocoapods
# Install all Kakao Game frameworks pod 'KakaoGameSDK', '4.5.0'
If only using the Kakao module
iOS cocoapods
# Install only the Kakao module pod 'KakaoGameSDK/KakaoGameKakao', '4.5.0'
Navigate to the terminal and install the Kakao Game framework using the following command.
pod install
3.2. Adding the Kakao Game SDK (zip package)
Unzip the downloaded file, and add the "KakaoGameFramework" and "IDPFramework" folders to your Xcode project.
Make sure to check "Copy items if needed" so that the frameworks are copied if necessary.
Verify that the frameworks have been successfully added as shown below.
If haven't added it, manually add it as below.
3.3. Setting Other Linker Flags
In the "Build Settings" tab of your project, add -ObjC and -lc++ to the "Other Linker Flags".
3.4. Setting Kakao Game SDK Properties
In the "Info" tab of your project, you need to add properties related to the Kakao Game SDK in the "Custom iOS Target Properties".
Key | Child Key | Type | Required | Description | Example |
---|---|---|---|---|---|
SHOW_ADID_USAGE_POPUP |
| Bool | X | Flag to allow the ad identifier usage popup. (Set to 1 or YES to display the popup) | YES |
To configure Sign in with Apple, you need to add the relevant capabilities in your project settings.
3.5. Adding URLScheme
Kakao Game
Add a string that combines "kakaogame" and the app ID (KakaoGameConfiguration-AppId). ex)kakaogame103815
Kakao
Add a string that combines "kakao" and the native app key (app secret) obtained from the Kakao Developers site. ex)kakao951b75bf17fe0885ab5106ba2a9f9bc9
To support multi-app Kakao login, if you want to apply the multi-app login spec, configure it as follows. (Contact the technical PM, as this requires settings in the Kakao Developer Center.)
For the games where you want to apply the multi-app configure it in the Info.plist of each app project with the bundle IDs com.kakaogame.appOne / com.kakaogame.appTwo.
In the section where you add the URL Scheme, add "KakaoAppLogin" in the Identifier field and register the URL Scheme item in the format kakao{appSecret}-{bundleId}
kakao951b75bf17fe0885ab5106ba2a9f9bc9-com.kakaogame.appOne
kakao951b75bf17fe0885ab5106ba2a9f9bc9-com.kakaogame.appTwo
Refer to the screenshot
After adding as above, when you build each app, Kakao login will be possible in each app.
3.6. Setting LSApplicationQueriesSchemes
You need to add the "LSApplicationQueriesSchemes" (Queried URL Schemes) item to the Info.plist file.
Below is the content that needs to be added.
Right-click the Info.plist file as shown below, then select [Open As] - [Source Code]. Copy and paste the above XML.
Make sure to replace only the kakao[replace with app secret] part with your app secret.
3.7.1. Setting Access Permissions
Privacy - Description
From iOS 10 onwards, you must enter a description when accessing system apps. If not entered, the build may be rejected when uploading to the store.
he Kakao Game SDK requires access permissions for the camera and photo library. Therefore, you need to enter the access permission descriptions as follows.
Access Permission | Description |
---|---|
NSUserTrackingUsageDescription | Used for providing personalized advertisements. |
If the developer needs additional access permissions, they can be added as necessary.
3.7.2. Setting Access Permissions Localization
By default, the permission setting description you create in info.plist does not apply to localization.
Additional work is required to set up localized resources.
Add the InfoPlist.strings file to the project.
Add a localization language to set up.
Add a key and enter a localizaed string.
InfoPlist.strings (ex : en.lproj)
InfoPlist.strings (ex : ja.lproj)
InfoPlist.strings (ex : ko.lproj)
InfoPlist.strings (ex : zh-hant.lproj)
3.8. Game Supported Language Resources
If there are additional language packs in the library that are not supported by the game and you want to remove them, you can delete the corresponding folder at the location below.
To load the language provided by the Kakao Game SDK according to the user's device language settings, you need to configure the Info.plist.
Key | Type | Description | Example |
---|---|---|---|
Localized resources can be mixed | Boolean | Required setting to load the language provided by the Kakao Game SDK according to the user's device language settings. | YES |
Find the KakaoGameResources.bundle file in the KakaoGameFramework folder and click 'Show Package Contents.'
Delete the folder for the language you want to remove.
3.9 (Reference) Guide on Supporting Multiple Bundle IDs
You can use multiple bundle IDs for one app (app id).
We support cases where multiple bundle IDs are required, such as for test builds.
However, the bundle ID registered in Game Center must match the live version (the build version uploaded to the market).
Apps with bundle IDs that meet the following rules can call the Kakao Game API.
However, there may be some restrictions on certain features.
3.10 Guide on SceneDelegate
Currently, KakaoGameSDK not supports SceneDelegate.
Therefore, if the project is made to use SceneDelegate, deletion is required.
Delete SceneDelegate.swift file.
Delete ‘Application Scene Manifest’ in info.plist.
Delete UISceneSession methods in AppDelegate
Add 'UIWindow” property in AppDelegate