I am in the throes of trying to publish an app for both iOS and Android mobile devices and am having trouble finding some guides related to how to most easily target these two platforms without duplicating code or FLA files.
So far, I have one single code base that checks CONFIG::DEVICE constant to know what platform dependant classes it should or shouldn't use, but as for the FLA, I have two copies of this same FLA with different publishing settings (one set for iOS and one set for Android, and each with the appropriate difference set in the config constant). Needless to say, managing two FLAs with nearly identical content is a pain in the butt.
How am I supposed to do it (using Flash Professional CS6)? I was considering using "Profiles" (upper left corner of Publish Settings panel) but in the past whenever I've relied on Profiles it has been unrealiable. For example, the SWF file name doesn't change, making it a pain to try and make a seperate SWF for iOS and one for Android. If I just change the target platform in the pulldown mennu for that, will it remember the old settings when I come back to a previous selection? (ie: AIR 3.6 for ios, vs AIR 3.6 for Android, etc)
Suggestions? I couldn't find anything by Googling.
If you absolutely must have one FLA only and are only asking how you can save the time of always switching between the publishing options for ios/android then you could write yourself a script with jsfl that automates that task for you.
Sure but why doesn't Adobe, who has been pitching Flash & Adobe AIR as "author once, publish to multiple targets" fix this very simple problem?
I experimented some more and I managed to set up one FLA with two profiles. One is configured for iOS and the other is configured for Android. It WORKS fine except the iOS settings loses all the icons except for the 3 it has in common with the Android side. Conversely, the Android side loses extra Manifest parameters I need for Admob extension integration. It's quite frustrating that this works up to 95% and then loses it. All they really need to do is tie separate app.xml files to seperate publishing profiles.
One way around this would be if I set each profile to publish to a different swf file. AH, but guess what, that is the ONE setting that a profile does NOT save!!!!!!
Thanks for your tip though.