{"id":7773,"date":"2013-03-28T13:27:01","date_gmt":"2013-03-28T04:27:01","guid":{"rendered":"http:\/\/labs.gree.jp\/blog\/?p=7773"},"modified":"2021-04-27T15:04:00","modified_gmt":"2021-04-27T06:04:00","slug":"gree-platform-sdk-for-cocos2dx-now-supports-ios","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2013\/03\/7773\/","title":{"rendered":"GREE Platform SDK for Cocos2dx now supports iOS."},"content":{"rendered":"<p>Hi everyone, I'm Kazuma from GREE. First of all, i'm sorry for the long blank since my previous article below.<br \/>\n<a href=\"http:\/\/labs.gree.jp\/blog\/2012\/12\/6846\/\">http:\/\/labs.gree.jp\/blog\/2012\/12\/6846\/<\/a><\/p>\n<p>I was fortunate to have my article featured on the Cocos2d-x main project page.<br \/>\n<a href=\"http:\/\/www.cocos2d-x.org\/news\/91\">http:\/\/www.cocos2d-x.org\/news\/91<\/a><\/p>\n<p>As promised in my previous article, I have added iOS support to my library. So now you can use my GREE Platform SDK for Cocos2d-x on both Android and iOS with the same code.<br \/>\nIn this article, I will describe how to develop a Cocos2d-x application for iOS that connects to the GREE Platform.<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2013\/03\/7773\/%e3%82%b9%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%b7%e3%83%a7%e3%83%83%e3%83%88-2013-03-25-12-32-32-pm\/\" rel=\"attachment wp-att-7825\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-25-12.32.32-PM.png\" alt=\"\" title=\"screenshot\" width=\"343\" height=\"171\" class=\"alignnone size-full wp-image-7825\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-25-12.32.32-PM.png 343w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/-2013-03-25-12.32.32-PM-276x137.png 276w\" sizes=\"auto, (max-width: 343px) 100vw, 343px\" \/><\/a><\/p>\n<p>In addition, I will be introducing a new feature I added to my library, WebView plugin, that allows you to implement a platform independent webview from the Cocos2d-x context.<\/p>\n<h3 id=\"hs_cfacc80c2c3036ab4c65226f5233b9ca_header_0\">Integrate GREE Platform SDK with your Cocos2d-x game for iOS.<\/h3>\n<p>This guide provides step-by-step instructions on how to integrate GREE SNS features (User information, FriendList, Payment, and so on) with your Cocos2d-x applications for iOS.<\/p>\n<h3 id=\"hs_cfacc80c2c3036ab4c65226f5233b9ca_header_1\">Requirements<\/h3>\n<p>You should have Xcode installed on your machine.<\/p>\n<h3 id=\"hs_cfacc80c2c3036ab4c65226f5233b9ca_header_2\">Get GREE Platform SDK for iOS<\/h3>\n<p>The latest version of the GREE Platform SDK is available from:<br \/>\n<a href=\"https:\/\/developer.gree.net\">https:\/\/developer.gree.net<\/a><br \/>\n<a href=\"https:\/\/developer.gree.net\/en\/\">https:\/\/developer.gree.net\/en\/<\/a><br \/>\nPlease download the SDK for iOS.<br \/>\nYou can also find a Developer\u2019s Guide at the URL above with instructions on how to add libraries to develop general iOS applications with GREE SDK in Xcode.<br \/>\nInstructions in this article were performed using GREE SDK version v3-4-21.<br \/>\nTo activate your GREE Application, you need to acquire a GREE Application Id, a GREE Consumer Key, a GREE Consumer Secret, and edit your source code such that these are properly configured for your application. I will describe how to do that further down in this article.<br \/>\n<\/p>\n<h3 id=\"hs_cfacc80c2c3036ab4c65226f5233b9ca_header_3\">Get Cocos2d-x and GREE Platform SDK for Cocos2d-x<\/h3>\n<p>Get GREE Platform SDK for Cocos2d-x.<\/p>\n<pre class=\"superpre \">\n$git clone https:\/\/github.com\/gree\/GreePlatformSDKCocos2dx.git\n$cd GreePlatformSDKCocos2dx    # top of the cloned directory\n$.\/setup.sh<\/pre>\n<p>setup.sh downloads Cocos2d-x source code and adds GREE Platform SDK for Cocos2d-x to it. It also provides a sample application which connects to the GREE Platform.<\/p>\n<h3 id=\"hs_cfacc80c2c3036ab4c65226f5233b9ca_header_4\">Install template for Xcode<\/h3>\n<pre class=\"superpre \">\n$cd cocos2dx-2.0-x-x.x.x<\/pre>\n<p>Usually one would execute install-templates-xcode.sh to install Cocos2d-x templates for Xcode. This library however provides a install-gree-templates-xcode.sh file that installs GREE Platform SDK templates for Xcode.<br \/>\nPlease execute it with sudo.<\/p>\n<pre class=\"superpre \">\n$sudo .\/install-gree-templates-xcode.sh\nPassword:\ncocos2d-x template installer including gree-extension\ncocos2d-x template installer\n\n\n\nInstalling Xcode 4 cocos2d-x iOS template\n----------------------------------------------------\n\ntemplates already installed. To force a re-install use the '-f' parameter\n\n\n\nInstalling Xcode 4 cocos2d-x gree_extension iOS template\n----------------------------------------------------\n\n...copying gree extension files\ndone!<\/pre>\n<p>If successful, the template for gree_extension should now be installed under the \"~\/Library\/Developer\/Xcode\/Templates\/\" directory.<\/p>\n<h3 id=\"hs_cfacc80c2c3036ab4c65226f5233b9ca_header_5\">Build your application<\/h3>\n<p>Launch Xcode.<br \/>\n<a href=\"http:\/\/labs.gree.jp\/blog\/2013\/03\/7773\/%e3%82%b9%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%b7%e3%83%a7%e3%83%83%e3%83%88-2013-03-22-8-44-05-pm\/\" rel=\"attachment wp-att-7808\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-22-8.44.05-PM.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-03-22 8.44.05 PM\" width=\"247\" height=\"256\" class=\"alignnone size-full wp-image-7808\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-22-8.44.05-PM.png 247w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/-2013-03-22-8.44.05-PM-192x200.png 192w\" sizes=\"auto, (max-width: 247px) 100vw, 247px\" \/><\/a><\/p>\n<p>Select \"Create a new Xcode project\".<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2013\/03\/7773\/%e3%82%b9%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%b7%e3%83%a7%e3%83%83%e3%83%88-2013-03-22-8-44-37-pm\/\" rel=\"attachment wp-att-7811\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-22-8.44.37-PM.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-03-22 8.44.37 PM\" width=\"364\" height=\"247\" class=\"alignnone size-full wp-image-7811\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-22-8.44.37-PM.png 364w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/-2013-03-22-8.44.37-PM-276x187.png 276w\" sizes=\"auto, (max-width: 364px) 100vw, 364px\" \/><\/a><\/p>\n<p>Select the \"cocos2dx_gree_extension\" template and click Next.<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2013\/03\/7773\/%e3%82%b9%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%b7%e3%83%a7%e3%83%83%e3%83%88-2013-03-22-8-46-30-pm\/\" rel=\"attachment wp-att-7814\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-22-8.46.30-PM.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-03-22 8.46.30 PM\" width=\"366\" height=\"245\" class=\"alignnone size-full wp-image-7814\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-22-8.46.30-PM.png 366w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/-2013-03-22-8.46.30-PM-276x184.png 276w\" sizes=\"auto, (max-width: 366px) 100vw, 366px\" \/><\/a><br \/>\nFill in the Product name, Company Identifier and select Next.<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2013\/03\/7773\/%e3%82%b9%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%b7%e3%83%a7%e3%83%83%e3%83%88-2013-03-22-8-47-54-pm\/\" rel=\"attachment wp-att-7815\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-22-8.47.54-PM.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-03-22 8.47.54 PM\" width=\"295\" height=\"109\" class=\"alignnone size-full wp-image-7815\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-22-8.47.54-PM.png 295w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/-2013-03-22-8.47.54-PM-276x101.png 276w\" sizes=\"auto, (max-width: 295px) 100vw, 295px\" \/><\/a><br \/>\nSpecify the location in which you wish to store the project to create, and select Create.<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2013\/03\/7773\/%e3%82%b9%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%b7%e3%83%a7%e3%83%83%e3%83%88-2013-03-22-8-51-11-pm\/\" rel=\"attachment wp-att-7820\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-22-8.51.11-PM.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-03-22 8.51.11 PM\" width=\"138\" height=\"215\" class=\"alignnone size-full wp-image-7820\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-22-8.51.11-PM.png 138w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/-2013-03-22-8.51.11-PM-128x200.png 128w\" sizes=\"auto, (max-width: 138px) 100vw, 138px\" \/><\/a><br \/>\nIf everything went well, you now have a new cocos2d-x project for the GREE Platform.<\/p>\n<p>Now you need to add GREE Platform SDK libraries into your project. Please refer to the Developer\u2019s Guide I mentioned above for instructions on how to add them to your project.<br \/>\nI shall skip the detailed instructions for that in this article. After adding the libraries your project tree should look like this:<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2013\/03\/7773\/%e3%82%b9%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%b7%e3%83%a7%e3%83%83%e3%83%88-2013-03-25-12-32-21-pm\/\" rel=\"attachment wp-att-7816\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-25-12.32.21-PM.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-03-25 12.32.21 PM\" width=\"132\" height=\"323\" class=\"alignnone size-full wp-image-7816\" \/><\/a><\/p>\n<p>Lastly, you have to set your GREE Application Id, Consumer Key, Consumer Secret in the init function of the \"GreePlatformDispatcher.mm\" file. This is the only part in which you are exposed to Objective-C code.<\/p>\n<pre class=\"superpre cpp\">\n-(id)init\n{\n    \/\/ Initialize GreePlatformSDK\n    NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys : GreeDevelopmentModeSandbox, GreeSettingDevelopmentMode, nil];\n\n    [GreePlatform initializeWithApplicationId : @\"xxxxx\" consumerKey : @\"xxxxxxxxxx\" consumerSecret : @\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"  settings : settings delegate : self ];\n\n    return self;\n}<\/pre>\n<p>You can now click \"Run\" to build and execute the application on simulator.<\/p>\n<p>Currently, Authorizer(login\/logout), People(User\/Friends), Payment, ShareDialog, InviteDialog are supported, for which the same C++ APIs as Android can be used. Callbacks can also be handled with the same APIs.<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2013\/03\/7773\/%e3%82%b9%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%b7%e3%83%a7%e3%83%83%e3%83%88-2013-03-25-12-41-41-pm\/\" rel=\"attachment wp-att-7823\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-25-12.41.41-PM.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-03-25 12.41.41 PM\" width=\"337\" height=\"175\" class=\"alignnone size-full wp-image-7823\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-25-12.41.41-PM.png 337w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/-2013-03-25-12.41.41-PM-276x143.png 276w\" sizes=\"auto, (max-width: 337px) 100vw, 337px\" \/><\/a><br \/>\n<\/p>\n<h3 id=\"hs_cfacc80c2c3036ab4c65226f5233b9ca_header_6\">ShareDialog API<\/h3>\n<p>This is the ShareDialog API example included in the library (ShareDialog enables you to update images like ScreenShot on the server and share them with your friends).<\/p>\n<pre class=\"superpre cpp\">\n\/\/ To enable ShareDialog callback\nCCGreePlatform::setShareDialogDelegate(this);\n\n\/\/ Capture Application ScreenShot\nCCSize size = CCDirector::sharedDirector()->getWinSize();\nCCRenderTexture *tex = CCRenderTexture::renderTextureWithWidthAndHeight(size.width, size.height);\ntex->setPosition(ccp(size.width\/2, size.height\/2));\ntex->begin();\nthis->visit();\ntex->end();\nCCImage *img = tex->newCCImage();\n\n\/\/ Code for launching a ShareDialog\nCCGreeShareDialog *dialog = CCGreeShareDialog::create();\nCCDictionary *dict = CCDictionary::create();\ndict->setObject(new CCString(\"This is test share\"), GD_SHARE_DIALOG_PARAM_KEY_MESSAGE);\ndict->setObject(img, GD_SHARE_DIALOG_PARAM_KEY_IMG);\ndialog->setParams(dict);\ndialog->show();\n\n\/\/Callbacks\nvoid HelloWorld::shareDialogOpened(CCGreeShareDialog *dialog){\n}\nvoid HelloWorld::shareDialogCompleted(CCGreeShareDialog *dialog, CCArray *userArray){\n}\nvoid HelloWorld::shareDialogClosed(CCGreeShareDialog *dialog){\n}<\/pre>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2013\/03\/7773\/%e3%82%b9%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%b7%e3%83%a7%e3%83%83%e3%83%88-2013-03-25-12-42-10-pm-2\/\" rel=\"attachment wp-att-7824\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-25-12.42.10-PM1.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-03-25 12.42.10 PM\" width=\"343\" height=\"175\" class=\"alignnone size-full wp-image-7824\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-25-12.42.10-PM1.png 343w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/-2013-03-25-12.42.10-PM1-276x140.png 276w\" sizes=\"auto, (max-width: 343px) 100vw, 343px\" \/><\/a><\/p>\n<p>As you may have noticed, for this case the iOS version requires less steps than the Android version to accomplish the same task.<\/p>\n<h3 id=\"hs_cfacc80c2c3036ab4c65226f5233b9ca_header_7\">WebView Plugin<\/h3>\n<p>I shall now talk about the new WebView plugin I added to GREE Platform SDK for Cocos2dx.<br \/>\nWith this new plugin, you can now use WebView on both Android and iOS with the same Cocos2d-x code.<br \/>\nYou can specify whether to use both GREE Platform features or just the WebView plugin with setup.sh.<\/p>\n<pre class=\"superpre sh\">\n$.\/setup.sh -m all  # prepare both of GREE Platform SDK and WebView plugin\n$.\/setup.sh -m webview # only setup WebView plugin<\/pre>\n<p>Install the WebView plugin template for Xcode with the install-webview-templates-xcode.sh file.<\/p>\n<pre class=\"superpre sh\">\n$ sudo .\/install-webview-templates-xcode.sh<\/pre>\n<p>This should add a new cocos2dx_webview_plugin template that you can select from Xcode.<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2013\/03\/7773\/%e3%82%b9%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%b7%e3%83%a7%e3%83%83%e3%83%88-2013-03-25-1-19-28-pm\/\" rel=\"attachment wp-att-7830\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-25-1.19.28-PM.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-03-25 1.19.28 PM\" width=\"366\" height=\"242\" class=\"alignnone size-full wp-image-7830\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-25-1.19.28-PM.png 366w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/-2013-03-25-1.19.28-PM-276x182.png 276w\" sizes=\"auto, (max-width: 366px) 100vw, 366px\" \/><\/a><\/p>\n<p>After creating the project, click Run to build and execute the application.<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2013\/03\/7773\/%e3%82%b9%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%b7%e3%83%a7%e3%83%83%e3%83%88-2013-03-25-1-22-53-pm\/\" rel=\"attachment wp-att-7831\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-25-1.22.53-PM.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-03-25 1.22.53 PM\" width=\"340\" height=\"178\" class=\"alignnone size-full wp-image-7831\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2013-03-25-1.22.53-PM.png 340w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2013\/03\/-2013-03-25-1.22.53-PM-276x144.png 276w\" sizes=\"auto, (max-width: 340px) 100vw, 340px\" \/><\/a><\/p>\n<p>The Cocos2d-x webpage should be displayed.<\/p>\n<p>Using it is simple:<\/p>\n<pre class=\"superpre cpp\">\n    \/\/CCWebView Test \n    pWebView = CCWebView::create();\n    pWebView->setRect(100, 100, size.width - 110, size.height - 20);\n    pWebView->setVisibility(true);\n    pWebView->loadUrl(\"http:\/\/www.cocos2d-x.org\/\");<\/pre>\n<p>This example is on iOS, but you can achieve the same result in Android with the same code.<\/p>\n<h3 id=\"hs_cfacc80c2c3036ab4c65226f5233b9ca_header_8\">Summary<\/h3>\n<p>Cross platform support is one of the key features of Cocos2d-x. With Cocos2d-x, you can build applications for different platforms (e.g. Android, iOS), and also integrate GREE Platform support for your application with a single codebase.<br \/>\nI hope this article invoked enough interest in you to motivate you to try it out for yourself.<br \/>\nThanks a lot for reading.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi everyone, I'm Kazuma from GREE. First of all, i'm sorry for the long blank since my previous article below. [&hellip;]<\/p>\n","protected":false},"author":42,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[171],"class_list":["post-7773","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-info","tag-info"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/7773","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=7773"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/7773\/revisions"}],"predecessor-version":[{"id":21174,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/7773\/revisions\/21174"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=7773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=7773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=7773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}