1.3. iOS SDK Installation

1.3. iOS SDK Installation

 


1.3.1. Installation and Runtime Environment

The minimum version of Xcode required may vary depending on the version of SDK being used.

Privacy Manifest was added from version 3.19.0.

  • IDE : Xcode 14.3 or higher

    • when using SDK 3.17.10 or higher, use Xcode 14.3 or higher

    • when using SDK 3.19.0 or higher, use Xcode 15.0 or higher

  • iOS : iOS 13.0 or higher

    • when using SDK 3.17.10 or higher, iOS Deployment Target 13.0 ~

1.3.2. SDK File Content

image-20240430-002941.png
  • KakaoGameFramework Folder

    • This folder consists of the Kakao Game SDK framework and resource bundle.

  • IDPFramework Folder

    • This folder includes IDP frameworks related to Kakao, Facebook, and Google.

  • KakaoGameSample

    • This is a sample project with the Kakao Game SDK applied.

  • APIReference

    • This is the API reference document of the Kakao Game SDK.

1.3.3. Installation

This section describes how to install the SDK in the XCode project with examples.

1.3.3.1. Add KakaoGame SDK(cocoapods)

  1. Open a new terminal window and navigate to the Xcode project location.

  2. Open the podfile and write it referring to the contents described below. Below you can use the content to be added for each case.

    1. When installing the full package (including Firebase)

      iOS cocoapods

      # Install all Kakao Game Framework pod 'KakaoGameSDK', '3.19.0'
    2. When using only Kakao modules

      iOS cocoapods

      # Kakao module only pod 'KakaoGameSDK/KakaoGameKakao', '3.19.0'
    3. When using the Facebook / Google module

      iOS cocoapods

      # Install Facebook module pod 'KakaoGameSDK/KakaoGameFacebook', '3.19.0' # KakaoGameFacebook dependency defaults to the latest version of FacebookSDK 17.0~    # Install Google module pod 'KakaoGameSDK/KakaoGameGoogle', '3.19.0' # KakaoGameGoogle dependency defaults to the latest version of GoogleSignIn 7.1~ # GoogleSignIn can be set to the desired version # pod 'GoogleSignIn', Can be set as '7.1.0'
  3. Go to the terminal and install the Kakao Game Framework through the following command.

1.3.3.2. Add KakaoGame SDK(zip package)


  1. Decompress the downloaded file and add the folders ‘KakaoGameFramework’ and ‘IDPFramework’ to the Xcode project.

     

  2. Make sure to check the ‘Copy items if needed’ item so that the frameworks will be copied as needed.


     

     

  3. Check if the frameworks have been added as follows.

     

     

1.3.3.3. Add required frameworks and libraries

  1. Add the external libraries used by the Kakao Game SDK and each SDK to ‘Link Binary with Libraries’ of the project’s ‘Build Phases’ tab.

Framework and library used by the Kakao Game SDK

Foundation.framework

SystemConfiguration.framework

CoreTelephony.framework

Security.framework

UIKit.framework

libc++.tbd

libz.tbd

Framework used by the Google SDK

AddressBook.framework

AssetsLibrary.framework

CoreLocation.framework

CoreMotion.framework

CoreGraphics.framework

CoreText.framework

MediaPlayer.framework

Framework used by the Facebook SDK

AdSupport.framework

StoreKit.framework

AVFoundation.framework

CoreMedia.framework

CoreMotion.framework

  1.  

     

  2. Click the + button as shown below to add all of the frameworks and libraries listed above.

     


     

  3. Check if all frameworks and libraries have been properly added.

     

 

1.3.3.4. Set Other Linker Flags

  1. Add ‘-ObjC’ to ‘Other Linker Flags’ of the project's ‘Build Settings’ tab.

     

1.3.3.5. Set Keychain

  1. Change the ‘Keychain Sharing’ option of the project's ‘Capabilities’ tab to ON and add ‘KakaoGameAccessGroup’ to the attributes.

     

     

1.3.3.6. Set KakaoGame SDK Properties

  1. Add Kakao Game SDK-related attributes to ‘Custom iOS Target Properties’ of the project's ‘Info’ tab.

    KakaoGame SDK Properties

Key

Child Key

Type

Required

Description

Example

Key

Child Key

Type

Required

Description

Example

KakaoGameConfiguration

 

Dictionary

O

 

 

 

AppId

String

O

Issued App ID

You can check it in Kakao Partner Center> Game Management> Select App> Game Details.

103815

 

AppSecret

String

O

This is the same as the Native App Key, which can be found in Kakao Partner Center> Game Management> Select App> Game Details.

951b75bf17fe0885ab5106ba2a9f9bc9

 

AppVersion

String

O

Sets the app version. App update requirements are provided automatically based on the set version. In Kakao Game 3.0 Admin -> Build Game -> Client Version Management, you can set market information and expose whether or not it is updated according to the version you set. (Refer to initialization and status change event of interlocking guide)

1.0.0

 

ServerType

String

X

Server type. ("real", "qa")

real

 

DebugLevel

String

X

Sets the log level (“VERBOSE”, “DEBUG”, “ERROR”, “NONE”). If not set, it is set to "NONE" by default

NONE

FacebookAppID

 

String

O

Facebook app ID

374087929645848

FacebookDisplayName

 

String

X

The title bar of the login window to be used for Facebook login attempts through Safari.

Facebook Login

FacebookReadPermissions

 

Array

X

Additional permissions to be received by the user after Facebook login.

https://developers.facebook.com/docs/facebook-login/permissions

user_photos

FacebookClientToken

Must be set when using KakaoGameSDK 3.15.0 or higher

 

String

O

Facebook Client Token

(developers facebook → My App → Settings → Advanced → Security tap)

dc9733ad123q6251273d181a0549qq56

GOOGLE_CLIENT_ID

 

String

O

Google client ID

1002041625464-69jc7iu6p8ugae62qg14rclcqoe8oubm.apps.googleusercontent.com

GOOGLE_SCOPES

 

Array

X

Additional permissions to be received by the user after Google login.
https://developers.google.com/identity/protocols/googlescopes

https://www.googleapis.com/auth/drive.readonly

APPLE_SERVICE_CLIENT_ID

 

String

O

Signin with apple Client ID required when using web authentication.

com.kakaogames.sdk.unity-service

 

Since the SDK provided by Facebook can not request Read permission and Publish permission at the same time, only Read permission can be added to Facebook authentication through the KakaoGame SDK.

(Publish permission: Permission to start with a specific word ("publish" or "manage") or "ads_management", "create_event", "rsvp_event", etc)

Therefore, if you need Publish-related functionality, you will need to get additional authentication with the Publish permission or use the Publish API provided by the Facebook SDK, such as ShareDialog.

  1.  

  2. Set up Kakao as shown below.

     

  3. Set up Facebook as shown below.

     

  4. Set up Google as shown below.

     

  5. Set Signin with Apple as shown below.

     

  6. You can also set the capabilities item to set up Signin With Apple.(You must be using Xcode 11 or later to use the Sign In with Apple feature.)

    1. Select Project Settings> Signing & Capabilities> + Capability.

       

    2. You must add the Sign In with Apple item in the Capabilities selection.
       

       

1.3.3.7. Add a URLScheme.

  • Kakao

    • Add a character string that combines "kakaogame" and the app ID (KakaoGameConfiguration-AppId). (ex)kakaogame103815

    • Add a character string that combines "kakao" and the app secret (KakaoGameConfiguration-AppSecret) entered in step 6.(ex)kakao951b75bf17fe0885ab5106ba2a9f9bc9

      • Since version 3.11.0 supports multi-app Kakao login, in the case of a game that wants to apply the multi-app login specification, specify the following:

        • The bundle ID of the multi-app of the game you want to apply com.kakaogame.appOne / com.kakaogame.appTwo Need to be set in Info.plist for each app project

        • After adding "KakaoAppLogin" to Identifier in the part to add URL Scheme, URL Scheme item is registered in the form of kakao{appSecret}-{bundleId}

          • kakao951b75bf17fe0885ab5106ba2a9f9bc9-com.kakaogame.appOne

          • kakao951b75bf17fe0885ab5106ba2a9f9bc9-com.kakaogame.appTwo

          • See screenshot

             

             

      • If you build in each app after adding as above, you can log in to Kakao in each app.

  • Facebook

    • Add a character string that combines "fb" and the FacebookAppID. (ex)fb374087929645848

  • Google

    • Add the current app’s bundle ID. (ex)com.kakaogames.sdk

    • Add the inverse array of the GOOGLE_CLIENT_ID value.

1.3.3.8. Set LSApplicationQueriesSchemes

Add the ‘LSApplicationQueriesSchemes’ item to the info.plist file.

iOS9 Privacy

Beginning with iOS9, the scheme information of all opened apps must be defined in the info file to enable switching between apps.

https://developer.apple.com/videos/play/wwdc2015-703/

 

  1. Below is what you need to add. (Note: The following queriesSchemes will be added to the snes invite share, even if you do not use peekaboo authentication, because they occasionally use the peekaboo app.)

  2. Right-click info.plist as shown below and click [Open As] - [Source Code]. Copy and paste the XML above.
    Only the Kakao (app secret with replace app) part needs to be changed to the secret of the app.

      

1.3.3.9. Set access permissions 

Privacy - Description

Beginning with iOS10, a guide message must be inputted when accessing a system app. If it is not inputted, build uploads to the store can be rejected.

  1. The Kakao Game SDK requires access to your camera and photo library. Therefore, enter a description of the access rights of the part as shown below.

     

Access Permission

Guide

Access Permission

Guide

NSCameraUsageDescription

It is used for customer center file attachment.

NSPhotoLibraryUsageDescription

It is used for customer center file attachment.

2. If developers need more access permission, developers can add them as needed.

 

 

1.3.3.10. Set gamecenter use

  1. If you use Game Center authentication, “Game Center” should be turned ON in Capabilities.

     

     

1.3.3.11. Supported language resource

If there is additional language pack in the library other than supported languages in the game and you want to delete it, you can do so by deleting the folder shown below.

  1.  You need to set info.plist to load the language provided by KakaoGameSDK to match your device language setting.

     

Key

Type

Description

Example

Key

Type

Description

Example

Localized resources can be mixed

Boolean

You need to set the language provided by KakaoGameSDK to load in accordance with your device language setting.

YES

 

  1.  

  2. Find the KakaoGameFramwork folder > KakaoGameResources.bundle and click "See Package Content".

     



  3. Delete the folder of the language you want to remove.

     

 

1.3.3.12. (Reference) Support for Multiple Bundle IDs

  • Multiple bundle IDs can be used for one application(App ID).

    • Kakao will provide support for cases requiring multiple bundle IDS (e.g. test build).

    • Note that a bundle ID you set in GameCenter should equal to a bundle ID to release to AppStore.

  • A bundle ID can call KakaoGame API if it satisfies the following rule.
    However, some functions may be restricted.

 

1.3.3.13. About using SceneDelegate

  • KakaoGameSDK not supports SceneDelegate because of supported iOS 11.0 or higher.

  • Therefore, if the project is made to use SceneDelegate, deletion is required.

  1. Delete SceneDelegate.m, .h file.

     

  2. Delete 'Application Scene Manifest’ in info.plist.

     

  3. Delete UISceneSession methods in AppDelegate.

     

  4. Add ‘UIWindow’ property in AppDelegate