Any way for the app to know what it's running on?

Is there any way that the app can tell whether it’s running in the simulator or on the device?

Reason for asking is that there is functionality that the simulator can’t handle, I.e. native.newTextField

If there was a dynamic way for the app to know, then at least I could use an if then else wrapper which would make for a smoother development/debug cycle.

TIA - Heinz
[import]uid: 6547 topic_id: 998 reply_id: 300998[/import]

Hi, Heinz. This is part of the “Detection of platform and capabilities” API on our roadmap for the final Corona 2.0, but currently it’s not in the latest beta.

We realize that it would be helpful, though! [import]uid: 3007 topic_id: 998 reply_id: 3092[/import]

Hope you saw my example by query the documents path and make assumptions about it in the examp,e code section
[import]uid: 6928 topic_id: 998 reply_id: 3358[/import]

Have not seen/found that. Can you send me the link please.

Although not a high priority at the moment as I set some variables manually to fake it and only occasionally forget.
[import]uid: 6547 topic_id: 998 reply_id: 3364[/import]

Its ab bit obscured… the original thread you find here: http://developer.anscamobile.com/forum/2010/06/15/huge-problem-font-positioning-between-simulator-and-device#comment-3211

But I just posted it as Code Sample:

http://developer.anscamobile.com/forum/2010/06/20/check-if-you-run-simulator-or-device [import]uid: 6928 topic_id: 998 reply_id: 3369[/import]

Thanks very much.

I’ll put that into play until v2 is out of beta. [import]uid: 6547 topic_id: 998 reply_id: 3373[/import]