Skip to main content
Participating Frequently
March 5, 2018
Question

how to find target platform in air simulator?

  • March 5, 2018
  • 2 replies
  • 415 views

when I run a app in air simulator,how can I find the current target platform whit some API?   I want to know the target platform (  iOS/Android/Desktop) ,Please help me! Thank you!

This topic has been closed for replies.

2 replies

AIRfansAuthor
Participating Frequently
March 5, 2018

I want to know the three arguments with code, Please any know ?

Inspiring
March 5, 2018

Those are choice that YOU make when launching the debugging of your app and those choice have nothing to do with runtime since they only apply to building and launching your app. In essence you are asking for a code to tell YOU what choice YOU made when debugging your app, none of this make any sense.

Maybe explain why you think you need to know by code what choice you make when launching a debugging session of your app.

Inspiring
March 5, 2018

This doesn't sound right, you are the one launching your app in a simulator so you should have 0 need to know dynamically what simulator you are starting on since a simple boolean in your code would do the job or more seriously using the CONFIG configuration. If the idea is to create a dynamic code that will be used on device and in prod as well then just do that.