• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

how to find target platform in air simulator?

Explorer ,
Mar 05, 2018 Mar 05, 2018

Copy link to clipboard

Copied

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!

TOPICS
Development

Views

308

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 05, 2018 Mar 05, 2018

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 05, 2018 Mar 05, 2018

Copy link to clipboard

Copied

platformkey.png

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 05, 2018 Mar 05, 2018

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines