This document aims to help you set up IntelliJ IDEA to use with Starling for desktop and mobile development.
Edit buttons and write away.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/
[path-to-starling]/starling/src. Make sure it's added as Raw ActionScript library, not as Library sources.This step can be skipped if you are working on a project that targets the Flash Plugin.
All AIR projects need a special application descriptor XML file to run. IDEA will create one automatically, but to be able to run your app using direct rendering, you'll need to alter a few things, so it's good to have such a file added to your project and not being recreated every time you hit build.
<renderMode>direct</renderMode>.The build configuration also supports running the app in the official iOS Simulator from Apple (on macOS only). However, it doesn't provide a way to choose the actual device being simulated (iPhone x, iPad?).
To do this, you need to set the environment variable AIR_IOS_SIMULATOR_DEVICE via the terminal to the corresponding value, for example:
launchctl setenv AIR_IOS_SIMULATOR_DEVICE "iPhone 4s" launchctl setenv AIR_IOS_SIMULATOR_DEVICE "iPhone 5" launchctl setenv AIR_IOS_SIMULATOR_DEVICE "iPhone 5s" launchctl setenv AIR_IOS_SIMULATOR_DEVICE "iPhone 6" launchctl setenv AIR_IOS_SIMULATOR_DEVICE "iPhone 6 Plus" launchctl setenv AIR_IOS_SIMULATOR_DEVICE "iPhone 7" launchctl setenv AIR_IOS_SIMULATOR_DEVICE "iPhone 7 Plus" launchctl setenv AIR_IOS_SIMULATOR_DEVICE "iPad 2" launchctl setenv AIR_IOS_SIMULATOR_DEVICE "iPad Retina" launchctl setenv AIR_IOS_SIMULATOR_DEVICE "iPad Air"
For reference: the String you have to use it the exact text you see in the “Hardware / Device” menu of the iPhone simulator. Beware: