Introduction
Cocos2d-x has a lot of APIs. However, there are no APIs that we need, for example, In-App purchase, push notification, and so on. In this case, we have to create original APIs and need to write Objective-C code for iOS or Java code for Android. In addition, we want to get the device information that it is running on. When we want to adjust for each device, we have to get the device information such as the running application version, device name, dpi on device, and so on. However, doing so is very difficult and confusing. In this chapter, you can write the native code for iOS or Android and get the device information.