Enterprise tutorial please

Are there any specific tutorials showing a general approach to how to integrate a external SDK into Corona using Enterprise?

I know that there is documentation for Enterprise but I am looking for more of a step by step type approach.

Many thanks in advance

Glyn

Agree.

From my point of view, this kind of step by step tutorial is missing for:

  • create a plugin for iOS

  • create a plugin for Android

  • use these plugins in a Corona Enterprise app project…

  • Extend the UI

The documentation is poor and, the main issue: the samples are most of them for Android…

Hi guys. Yes, I agree that we are missing a couple of step-by-step tutorials to make this easier. Most have figured it out from the sample projects, but it is not always obvious.

I’ll see if we can get some up soon. In the meantime, if you have specific questions, feel free to email me (david AT coronalabs.com) and I’ll do my best to get you answers.

I’ve created a few plugins for enterprise, but I’m sure Corona staff will write something better, however if you need a constant integration server/testing framework/team working plan, let me know, I’m happy to share my build scripts/configuration and overall plan on how to work in a team.

krystian6 I’m very interested in a sample, the best one should be an iOS + Android sample/project with the minimal code, just to extend the SDK with a fake function.

I’m interested, too, in a sample (iOS + Android) to extend the UI with a custom display function.

(and I’m OK to pay, not so much :), for that!)

I’ll try to write something tonight.

What do you mean by ‘extend the UI with a custom display function’ ?

you know you can create your own module and then in config.lua or main.lua do:

display.yourCustomFunction = yourCustomModule.function

Is this more or less what you are looking for?

If you want a quick solution, and create a new module in native, here’s a sample code I use to check if ad tracking is disabled/enabled on ios [will add something for Android later on].

Edit your AppCoronaDelegate.mm file in your project:

#import \<AdSupport/ASIdentifierManager.h\> @implementation AppCoronaDelegate // [lua=auto:0] cluain.checkAdTracking() static int checkAdTracking( lua\_State \*L ) { ASIdentifierManager \*adIdentManager = [ASIdentifierManager sharedManager]; if (adIdentManager.advertisingTrackingEnabled) { lua\_pushboolean(L, true); } else { lua\_pushboolean(L, false); } return 1; } - (void)willLoadMain:(id\<CoronaRuntime\>)runtime { lua\_State \*L = runtime.L; const luaL\_Reg kFunctions[] = { "isAdTrackingEnabled", checkAdTracking, NULL, NULL }; luaL\_register( L, "cluain", kFunctions ); lua\_pop( L, 1 ); }

With this you will be able to access cluain.isAdTrackingEnabled() function in your lua code.

Krystian

Agree.

From my point of view, this kind of step by step tutorial is missing for:

  • create a plugin for iOS

  • create a plugin for Android

  • use these plugins in a Corona Enterprise app project…

  • Extend the UI

The documentation is poor and, the main issue: the samples are most of them for Android…

Hi guys. Yes, I agree that we are missing a couple of step-by-step tutorials to make this easier. Most have figured it out from the sample projects, but it is not always obvious.

I’ll see if we can get some up soon. In the meantime, if you have specific questions, feel free to email me (david AT coronalabs.com) and I’ll do my best to get you answers.

How can I pass a parameter from Lua to C?

example:

var myname = “Bill”;

cluain.isAdTrackingEnabled(myname)

thank you 

sayhong7, you have an example in SimpleLuaExtention, there is several Lua function made with native code, some receiving parameters, other returning parameters.

Thank you for your help~

If I want to add Corona to my existed iOS/Android App, must copy existed source code/ images to SimpleLuaExtention?

Or can add some corona library to existed app project?

Does CoronaCards can call C like this?

I’ve created a few plugins for enterprise, but I’m sure Corona staff will write something better, however if you need a constant integration server/testing framework/team working plan, let me know, I’m happy to share my build scripts/configuration and overall plan on how to work in a team.

krystian6 I’m very interested in a sample, the best one should be an iOS + Android sample/project with the minimal code, just to extend the SDK with a fake function.

I’m interested, too, in a sample (iOS + Android) to extend the UI with a custom display function.

(and I’m OK to pay, not so much :), for that!)

I’ll try to write something tonight.

What do you mean by ‘extend the UI with a custom display function’ ?

you know you can create your own module and then in config.lua or main.lua do:

display.yourCustomFunction = yourCustomModule.function

Is this more or less what you are looking for?

If you want a quick solution, and create a new module in native, here’s a sample code I use to check if ad tracking is disabled/enabled on ios [will add something for Android later on].

Edit your AppCoronaDelegate.mm file in your project:

#import \<AdSupport/ASIdentifierManager.h\> @implementation AppCoronaDelegate // [lua=auto:0] cluain.checkAdTracking() static int checkAdTracking( lua\_State \*L ) { ASIdentifierManager \*adIdentManager = [ASIdentifierManager sharedManager]; if (adIdentManager.advertisingTrackingEnabled) { lua\_pushboolean(L, true); } else { lua\_pushboolean(L, false); } return 1; } - (void)willLoadMain:(id\<CoronaRuntime\>)runtime { lua\_State \*L = runtime.L; const luaL\_Reg kFunctions[] = { "isAdTrackingEnabled", checkAdTracking, NULL, NULL }; luaL\_register( L, "cluain", kFunctions ); lua\_pop( L, 1 ); }

With this you will be able to access cluain.isAdTrackingEnabled() function in your lua code.

Krystian

I’m a beginner and cannot help you more :slight_smile:

As an example today I needed to learn how to compile my Enterprise app (working with iOS now…) with Android.

I got a lot of issues, there is no clear documentation step by step in one place to compile “simpleluaextension” (which is the project I used as my base).

I found information here regarding how to setup android:

http://forums.coronalabs.com/topic/30433-resolved-please-help-very-urgent-compiling-error-when-building-for-android/

I’m now sure that to be able to use Corona Enterprise we need to be already good at native programming, know the Android SDK, etc. Otherwise it’s hell.

How can I pass a parameter from Lua to C?

example:

var myname = “Bill”;

cluain.isAdTrackingEnabled(myname)

thank you 

sayhong7, you have an example in SimpleLuaExtention, there is several Lua function made with native code, some receiving parameters, other returning parameters.

Thank you for your help~

If I want to add Corona to my existed iOS/Android App, must copy existed source code/ images to SimpleLuaExtention?

Or can add some corona library to existed app project?

Does CoronaCards can call C like this?

I’m a beginner and cannot help you more :slight_smile:

As an example today I needed to learn how to compile my Enterprise app (working with iOS now…) with Android.

I got a lot of issues, there is no clear documentation step by step in one place to compile “simpleluaextension” (which is the project I used as my base).

I found information here regarding how to setup android:

http://forums.coronalabs.com/topic/30433-resolved-please-help-very-urgent-compiling-error-when-building-for-android/

I’m now sure that to be able to use Corona Enterprise we need to be already good at native programming, know the Android SDK, etc. Otherwise it’s hell.