Cocos2d-x
Quick Start
Download the Latest Version
Application of Navergame SDK to the Pre-existing Project
This guideline has been written in respect to version 3.17.2 of Cocos2d-x.
1. Plugin Configuration
The files needed for the SDK are contained in the Plugins folder within the sample project.

) android : Contains the files needed for the android build.
) ios : Contains the files needed for the ios build.
) navergamesdk : contains the cocos2d-x project as well as the files that have to be connected to the respective platforms, such as android and ios.
2. Plugin Installation
In order to synchronize the SDK with your company’s Cocos2d-x project, copy the navergamesdk folder within Plugins into the Classes folder within your company’s project.

If your company is planning to release on a single platform, either android or ios, from the project, keep only the relevant folder, android or ios, located at the bottom end of the platform and delete the rest.
2-1. NaverGameSDK.h
The file contains the written code necessary for the sdk connection.

3. Plugin Application
Include the header file in the location within your company’s project that is trying to use the sdk. (Applied to HelloWorldScene.h for the sample project)
If it is unable to find NaverGameSDK.h, the header file has to also be included in the rootProject/CmakeLists.txt as shown in the image below.


3-1. NaverGame SDK initialization
During the initializing of Navergame SDK, the options have to be set as shown in the following, and the init() method has to be called.
ClientId: The Client Id received after registering the application at developers center upon logging in with a Naver Id.
ClientSecret: The client secret received after registering the application at developers center upon logging in with a Naver Id.
LoungeId: The Lounge Id received after requesting for an official lounge.
3-2. SDK Event Listener Registration
In order to receive the various events sent from the SDK, a listener has to be registered.