How do I include a small Cocos2D-X game inside a native iOS or Android application?

I need to include a single screen game inside a native iOS app and a native Android app (don’t ask me why).

The game will open in a full screen by tapping a button on the native app, and there will be a button inside the game to return back to the native app.

Any hints and guidelines are welcome.

check url schema for IOS/Android apps if want to navigate to anoother app from app. Otherwise I only saw in Hike messenger such functionality - they had part of cocos2d-x core inside app and then only downloaded game resources and some code which was running on flight.

If u wunning cocos2d-x js version then it is much easier as you can run html5 games inside native app.

Thanks for the comment. Is it possible to show the Cocos2D JS game inside a WebView?

I was trying to Cordova framework and was running inside it cocos2d js files on IOS/Android - it was working - I think u should somehow emulate web server in app if cocos2d-js files are placed inside app or u can call webview for external hosting site with game.