How about add a function to get device name in CCDirector ? it returns “iPad”, “iPhone”, “windows”, “android” …. so it is easy to compile universal bundle on iOS platform, and easily to write lua code on different target.
How about add a function to get platform name in CCDirector ?
There is a macro CC_TARGET_PLATFORM.
You can refer HelloWorld/Classes/AppDelegate.cpp.