Closed kevinfoley closed 7 years ago
Good idea!
I simply added a setter for SystemUtil.platform
. That should do the trick.
It's worth mentioning that you can use the -XversionPlatform option when running a mobile AIR app on desktop with ADL.
-XversionPlatform IOS -XversionPlatform AND
If you're launching from an IDE, there may be a way to pass additional options to ADL.
(I know that Animate CC doesn't support extra ADL options, so the ability to override the platform in ActionScript is still a good idea)
Using SystemUtil, we can easily add platform-specific functionality.
However, this can be a headache if we want to temporarily test platform-specific functionality on a different platform (particularly, testing mobile layouts or functionality in the desktop debugger):
Obviously there are cleaner ways to handle this than my contrived examples. However, it would be nice if we could override the current platform in SystemUtil so that we didn't have to do it elsewhere. Something to the effect of
SystemUtil.pretendPlatformIsAndroid()