how to find build type (native build or corona sdk build)

Hi,

Is there any way to find the build type of product ,i want some code to execute when build is native and some other code when build type is corona sdk build(or live build).

Thanks

Not sure I follow. But let me see if I am on the same page. Currently, I have 2 version of an app in the wild. One version is integrated with Apptentive and is natively built and the other I use a form in corona lua for feedback and that one is built by corona sdk. Well, I can check that the Apptentive exists in the native version.

If you are building in native you must have a reason. Whatever extra you are adding to native could be your check in lua. If both codebases are the same and you are just building natively and non-natively, I don’t know of a way to know intrinsically which version it was built with. In that case, you can add a simple method in the native code that will respond in lua it was natively built.

Now 

thanks for your answer,I think i should explain better,
let me show my question in code,

i use below code to check if the device is real or simulator,I run some native plugins if the device is real.

if(system.getInfo( "environment" )~=simulator)then--check that this device is real --run native code end

now assume that i build apk using corona simulator(not android studio native) and test it on real device,so as you now above code should not run on the device because native codes crashes on this situation.
So how can i detect this condition to avoid running native codes on device,when i build apk using corona simulator?

Thanks

Not sure if it will fit your need but you can create a stub for the library that is native. You can return whatever you want in the function but many just return a warning. 

On a mac they are located here and there are plenty of examples:

\<your drive name\> -\> Users -\> \<Your User Name\> -\> Library -\> Application Support -\> Corona -\> Simulator -\> Plugins

Not sure I follow. But let me see if I am on the same page. Currently, I have 2 version of an app in the wild. One version is integrated with Apptentive and is natively built and the other I use a form in corona lua for feedback and that one is built by corona sdk. Well, I can check that the Apptentive exists in the native version.

If you are building in native you must have a reason. Whatever extra you are adding to native could be your check in lua. If both codebases are the same and you are just building natively and non-natively, I don’t know of a way to know intrinsically which version it was built with. In that case, you can add a simple method in the native code that will respond in lua it was natively built.

Now 

thanks for your answer,I think i should explain better,
let me show my question in code,

i use below code to check if the device is real or simulator,I run some native plugins if the device is real.

if(system.getInfo( "environment" )~=simulator)then--check that this device is real --run native code end

now assume that i build apk using corona simulator(not android studio native) and test it on real device,so as you now above code should not run on the device because native codes crashes on this situation.
So how can i detect this condition to avoid running native codes on device,when i build apk using corona simulator?

Thanks

Not sure if it will fit your need but you can create a stub for the library that is native. You can return whatever you want in the function but many just return a warning. 

On a mac they are located here and there are plenty of examples:

\<your drive name\> -\> Users -\> \<Your User Name\> -\> Library -\> Application Support -\> Corona -\> Simulator -\> Plugins