Game > Gamebase > iOS Developer's Guide > Getting Started

Environments

[INFO]

Minimum specifications

  • User run environment : iOS 9 or later
  • Build environment : Xcode 13 (iOS 15 SDK) or later


[Caution]

If some IdPs are supported, see the Support iOS Version field in the 3rd Party Gamebase Auth Adapters table shown below. When releasing the AppStore, Apple version policy must be complied with.

  • https://developer.apple.com/ios/submit/

Setting

Gamebase can be setup as below.

Download

Download Gamebase.framework.zip and required adapters.
Also download SDK files to authenticate each IdP, which are required only for a login.
Then, include corresponding SDK files to a target of your project.

Gamebase iOS SDK Components

Gamebase SDK Gamebase Auth Adapter External(iOS) SDK & Compatible Version Usage Support iOS Version
Gamebase Gamebase.framework
Gamebase.bundle
NHNCloudSDK 1.0.0 Includes the interface and key logic of Gamebase iOS 9 or later
Gamebase Auth Adapters GamebaseAuthFacebookAdapter.framework FacebookSDK v9.2.0 Supports Facebook login iOS 9 or later
GamebaseAuthPaycoAdapter.framework PaycoID Login 3rd SDK v1.5.5 Supports PAYCO login iOS 9 or later
GamebaseAuthNaverAdapter.framework naveridlogin-sdk-ios-4.1.1 Supports NAVER login iOS 9 or later
GamebaseAuthGamecenterAdapter.framework GameKit.framework Supports Game Center login iOS 9 or later
GamebaseAuthGoogleAdapter.framework GoogleSignIn 5.0.2 Supports Google login iOS 9 or later
GamebaseAuthTwitterAdapter.framework Supports Twitter login iOS 9 or later
GamebaseAuthLineAdapter.framework LineSDK v5.8.2 Supports LINE login iOS 10 or later
GamebaseAuthAppleidAdapter.framework Sign In with Apple iOS 9 or later
arm64 support
GamebaseAuthHangameAdapter.framework HangameID SDK 1.7.1 Supports Hangame login iOS 9 or later
GamebaseAuthWeiboAdapter.framework weibo_ios_sdk-3.2.7 Supports Weibo login iOS 9 or later
GamebaseAuthKakaogameAdapter.framework KakaoGame 3.14.4 Supports Kakao login iOS 11 or later
Gamebase IAP Adapters GamebasePurchaseIAPAdapter.framework StoreKit.framework
NHNCloudIAP 1.0.0
ToastGamebaseIAP 0.14.0
Supports in-game purchase iOS 9 or later
Gamebase Push Adapters GamebasePushAdapter.framework NHNCloudPush 1.0.0 Supports Push iOS 9 or later

[Caution]

When adding the AuthenticationServices.framework required for Sign In with Apple, it must be set to Optional. If it is set to Required, the devices running on iOS version 11 or earlier crashes immediately after launching the app.

Gamebase SDK iOS 2.13.0 or later supports Sign In with Apple in iOS 9 or later, and additionally the Service ID needs to be set in the Gamebase Console.


[Caution]

The Gamebase Framework files that contain Adapter in their name can be selected to determine whether they will be used within the project or not. It is recommended to remove any unused Adapter Frameworks. To use these Adapter Frameworks, the external SDKs specified in the above table might be required. For some Auth Adapters, be aware of the supported iOS versions listed in the table above. (If an Auth Adapter that supports iOS version 10 or later is included in the build, it will crash on iOS 9 or earlier.)


[INFO]

For setting of external SDKs which each IdP provides, refer to each IdP guide.

Xcode Settings

By decompression, following SDKs will show, including Gamebase.framework.

unzip gamebase

  • 1) Drag framework files to Project Navigator of the project and import. Note that added framework files should be added to a project target.
  • 2) Also add the Gamebase.bundle file to Copy Bundle Resources. Gamebase.bundle Bundle Resources
  • 3) To use Gamebase, a number of frameworks and library files must be added so that they can be referenced by the linker. This is to include the features of the external SDKs used by Gamebase in addition to the framework of Gamebase. You need to add the following:
    • libicucore.tbd
    • libz.tbd
    • libsqlite3.tbd
    • libc++.tbd
    • AdSupport.framework
    • ImageIO.framework
    • GameKit.framework
    • StoreKit.framework
    • Security.framework
    • AuthenticationServices.framework (Optional)
    • AppTrackingTransparency.framework (Optional)

Link Binary With Libraries

  • 4) When using Gamebase iOS SDK 2.12.0 or later, additional settings are required as Facebook SDK is updated.
    • Adding Accelerate.framework
    • Add an empty swift file within the project (When there are not any swift files within the project)
  • 5) Go to Target > Build Settings > Linking > Other Linker Flags and add -ObjC. Other Linker Flags
  • 6) When using NaverAuthAdapter, the NaverThirdPartyLogin.framework file provided by NAVER SDK should be added to Target > Build Phases > Embeded Frameworks. Naver Embeded Frameworks
  • 7) When using LineAuthAdapter, the LineSDK.xcframework file provided by LINE SDK should be added to Target > Build Phases > Embeded Frameworks. LINE Embeded Frameworks

[INFO]

The -ObjC option to the Linker allows all Objective-C classes and categories of Static Library to be loaded.
Therefore, if this option is not set, an error like selector not recognized may occur during runtime.


[Caution]

  • When building with Unity (2019.3 or later), import the Gamebase iOS SDK only to the UnityFramework target.
  • When you run Unity build, Unity-iPhone and UnityFramework are created in the Xcode project target.
  • Note that there may be problems with operation if you import the Gamebase iOS SDK in duplicate for each target.

CocoaPods Settings

You can set the Gamebase iOS SDK with CocoaPods.

  • 1) Execute Xcode to create a project.
  • 2) Execute the terminal to navigate to the directory of the project where CocoaPods will be applied.
  • 3) Execute the pod init command to create Podfile.
  • 4) Open the created Podfile with the editor and enter the following.
platform :ios, '10.0'

target 'SampleApplication' do
    pod 'Gamebase'
    pod 'GamebaseAuthFacebookAdapter'
    pod 'GamebaseAuthGamecenterAdapter'
    pod 'GamebaseAuthPaycoAdapter'
    pod 'GamebaseAuthNaverAdapter'
    pod 'GamebaseAuthTwitterAdapter'
    pod 'GamebaseAuthGoogleAdapter'
    pod 'GamebaseAuthLineAdapter'
    pod 'GamebaseAuthAppleidAdapter'
    pod 'GamebaseAuthWeiboAdapter'
    pod 'GamebasePushAdapter'
    pod 'GamebasePurchaseIAPAdapter'

    # Regarding how to use the following modules, please contact the Customer Center.
    pod 'GamebaseAuthHangameAdapter'
    pod 'GamebaseAuthKakaogameAdapter'
end

[Note]

Enter the target name of the created project in the target 'SampleApplication' do part.
You can specify versions by writing in this way: pod 'Gamebase', '2.6.0'. If no version is specified in each pod, the newest version is used.
Only some specific Adapters can be selected and applied.

[Caution]

If you do not use the latest Gamebase version, some adapter may not be available.

  • 5) Install Gamebase using the pod install or pod update command after Podfile is written.
  • 6) A [project name].xcworkspace file will be created when the installation is complete. From this point on, product is developed using the created xcworkspace file.

[Note]

For more detailed information on how to use CocoaPods, see Using CocoaPods at CocoaPods Guide.

IdP Settings

[Caution]

  • Make sure that Gamebase service is enabled by creating a new project from NHN Cloud Console.
  • Make sure that Client ID is issued by each IdP console and the IDs are entered in the Gamebase console.

Google

PAYCO

  • URL Scheme must be configured.
    • Go to Xcode > Target > Info > URL Types and add tcgb.{Bundle ID}.payco
    • Go to Xcode > Target > Info > URL Types and add paycologinsdk.
  • URL Scheme must be configured.
    • Go to Xcode > Target > Info > URL Types and add tcgb.{Bundle ID}.naver
    • In NAVER Developers > My Application > API Settings > iOS > URL Scheme, add tcgb.{Bundle ID}.naver.
  • Register the Scheme in the Info.plist file.
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>naversearchthirdlogin</string>
    <string>naversearchapp</string>
</array>

Twitter

  • URL Scheme must be configured.
    • Go to Xcode > Target > Info > URL Types and add tcgb.{Bundle ID}.twitter
  • Need to configure Apps > Target Project > App Details > Callback URL on the Developer site of Twitter.
    • Add tcgb.{Bundle ID}.twitter://.

LINE

  • URL Scheme must be configured.

    • Go to Xcode > Target > Info > URL Types and add line3rdp.{App Bundle ID}
  • For ATS setting, register the Scheme in the Info.plist file.

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>lineauth2</string>
</array>

Weibo

IdP Settings (Legacy)

Google

  • Gamebase iOS SDK 2.34.1 or earlier
    • URL Scheme must be configured.
      • Add tcgb.{Bundle ID}.google in Xcode > Target > Info > URL Types.
  • Gamebase iOS SDK 1.12.1 or earlier
    • You need to provide JSON string-type data in the Additional Info field in NHN Cloud Console > Gamebase > App > Authentication Information > Additional Info & Callback URL.
      • For Google, you need to set url_scheme_ios_only required for iOS apps.
      • The value of url_scheme_ios_only must match one of the values registered for the URL Scheme of Xcode.
    • URL Scheme must be configured.
      • Xcode > Target > Info > URL Types
  • Example of entering the additional authentication information for Google
{ "url_scheme_ios_only": "Your URL Scheme" }

gamebase_auth_google_console_01

NAVER

  • Gamebase iOS SDK 1.12.1 or earlier
    • You need to provide JSON String-type data in the Additional Info field in NHN Cloud Console > Gamebase > App > Authentication Information > Additional Info & Callback URL.
      • For NAVER, service_name, which is the app name to be displayed on the Agree to Login window, needs to be configured.
      • url_scheme_ios_only, information needed by iOS apps, needs to be configured as well.
    • URL Scheme must be configured.
      • Xcode > Target > Info > URL Types
  • Example of entering the additional authentication information for NAVER
{ "url_scheme_ios_only": "Your URL Scheme", "service_name": "Your Service Name" }

gamebase_auth_naver_console_01 LINE

  • Gamebase iOS SDK 2.42.2 or earlier
    • You need to provide the ChannelID issued by LINE in the Info.Plist file.
<key>LineSDKConfig</key>
<dict>
    <key>ChannelID</key>
    <string>{Issued LINE ChannleID}</string>
</dict>

3rd-Party Provider SDK Guide

API Reference

Included in SDK.

API Deprecate Governance

The API which is not supported by Gamebase anymore is processed as deprecated (deprecate). A (deprecated) API can be deleted without any prior notice when the following conditions are met:

  • Minor version updates of five or more times.

    • Gamebase Version Format - XX.YY.ZZ
      • XX : Major
      • YY : Minor
      • ZZ : Hotfix
  • Time elapse of at least five months

TOP