Highlighted

how to find target platform in air simulator?

Explorer ,
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

211

Likes

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

how to find target platform in air simulator?

Explorer ,
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

212

Likes

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
Mar 05, 2018 0
Advocate ,
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.

Likes

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
Reply
Loading...
Mar 05, 2018 0
Explorer ,
Mar 05, 2018

Copy link to clipboard

Copied

platformkey.png

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

Likes

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
Reply
Loading...
Mar 05, 2018 0
ASWC LATEST
Advocate ,
Mar 05, 2018

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Mar 05, 2018 0