Hosting plugin on own server

I am trying to create a plugin that I want to host on my own server. I was able to compile it for iOS and Android and create .a and .jar file respectively. Now I want to use it in my Corona app. My question is; how do I host it on my own server. I read SelfHostedPlugin documentation, but was unable to understand the process of hosting it on my own server. Here is that documentation:

http://docs.coronalabs.com/native/hostedPlugin.html

Here is my directory structure:

Plugin/

     README.md

 

     Corona/

          build.settings

          config.lua

          Default-568h.png

          Icon-60.png

          Icon-60@2x.png

          Icon-72.png

          Icon-72@2x.png

          Icon-76.png

          Icon-76@2x.png

          Icon-ldpi.png

          Icon-mdpi.png

          Icon-ouya.png

          Icon-Small-40.png

          Icon-Small-40@2x.png

          Icon-Small-50.png

          Icon-Small-50@2x.png

          Icon-Small.png

          Icon-Small@2x.png

          Icon-hdpi.png

          Icon-xhdpi.png

          Icon-xxhdpi.png

          Icon.png

          Icon@2x.png

          main.lua

     android/

          AndroidManifest.plugin.xml

          AndroidManifest.xml

          ant.properties

          assets/

          build.plugin.sh

          build.plugin.xml

          build.properties

          build.sh

          build.xml

          libs/

               Corona.jar

               JNLua.jar

               AppLibrary.jar

          local.properties

          metadata.lua

          proguard-project.txt

          project.plugin.properties

          project.properties

          secure.properties

          src/

               plugin/

                    app/

                         <.java files>

     docs/

     ios/

          App-Info.plist

          AppCoronaDelegate.h

          AppCoronaDelegate.mm

          build.sh

          CoronaEnterprise/

          libAppLibrary.a

          main.mm

          metadata.lua

           Library/

          App.xcodeproj

          Plugin.xcodeproj

          Prefix.pch

 

I will reallly appriciate if you can guide me in the right direction with this.

obadahzaher - you are on a trial of Corona Enterprise, so that functionality is not activated on your account. Usually that function is only available for Corona Enterprise Unlimited licenses. But either way, it doesn’t work with trials. Sorry!

Ok so the only option I have right now is to make sure it is working via native deployments, and then apply for the unlimited licence. I will do that, but can you still guide me with the steps to host it on my own server, and check my directory listing (above). Once I have that functionality activated, this is what I want to do.

Regards,

Obadah

Obadah - let me ask you a question first to make sure we are on the same page: the reason you want to self-host is so you can do builds from the Corona simulator. Is that right?

Because otherwise you can of course just do offline builds with Corona Enterrpise (and Xcode).

Yes I have a game created in Corona SDK. I want to add paypal functionality to it. The plugin that you had from gremlininteractive, has been taken down (and does not work with iOS 8). So I created my own. I just want to add paypal functionality to that game.

Regards,

Obadah

Ok, that is why I asked. You dont need the “self hosted” plugins. That is for other scenarios (probably within a team). What you really need to do is just do a standard Corona Enterprise plugin that gets built locally.

Can you explain this a bit more. I don’t know the difference here. Should I copy and paste the plugin that I have (directory structure above), to “/Applications/Corona Enterprise/Plugins”? And what should I put in the build.settings of Corona SDK. This is what I already have as I was using gremlininteractive plugin.

plugins =

{

     – key is the name passed to Lua’s ‘require()’

     [“plugin.paypal”] =

     {

          – required

          publisherId = “com.gremlininteractive”,

     },

},

Regards,

Obadah

I didn’t realize that I was posting from other account. @DavidRangel I can only see documentation for self-hosted plugins and submission. Is there any link that explains how I can use it directly with Corona SDK?

I figured that out, thank you. Now I have been using facebook and chartboost plugin available for Corona SDK. How can I use these when I build the project via Xcode? It is giving me an error:

module ‘facebook’ not found:resource (facebook.lu) does not exist in archive …

 

Regards,

Obadah

Obadah - the standard plugins that you usually use via the build.settings have to be included in your Corona Enterprise project. Once you have a full license, you can download all the plugin files from the daily builds page.

Now I have the full subscription and I have downloaded the latest release of Corona Enterprise from the daily builds. I can’t find the plugins on that page or anywhere in the downloaded Corona Enterprise directory. I need your assistance to find it.

Regards,

Obadah

The page where you download the latest Enterprise daily build will have three links:  Enterprise itself, a plugins .tgz file and the documentation.  You need to download the plugins.tgz file as a separate download, unpack it and then find the plugin’s .a files that you need and copy them to your project.

Rob

obadahzaher - you are on a trial of Corona Enterprise, so that functionality is not activated on your account. Usually that function is only available for Corona Enterprise Unlimited licenses. But either way, it doesn’t work with trials. Sorry!

Ok so the only option I have right now is to make sure it is working via native deployments, and then apply for the unlimited licence. I will do that, but can you still guide me with the steps to host it on my own server, and check my directory listing (above). Once I have that functionality activated, this is what I want to do.

Regards,

Obadah

Obadah - let me ask you a question first to make sure we are on the same page: the reason you want to self-host is so you can do builds from the Corona simulator. Is that right?

Because otherwise you can of course just do offline builds with Corona Enterrpise (and Xcode).

Yes I have a game created in Corona SDK. I want to add paypal functionality to it. The plugin that you had from gremlininteractive, has been taken down (and does not work with iOS 8). So I created my own. I just want to add paypal functionality to that game.

Regards,

Obadah

Ok, that is why I asked. You dont need the “self hosted” plugins. That is for other scenarios (probably within a team). What you really need to do is just do a standard Corona Enterprise plugin that gets built locally.

Can you explain this a bit more. I don’t know the difference here. Should I copy and paste the plugin that I have (directory structure above), to “/Applications/Corona Enterprise/Plugins”? And what should I put in the build.settings of Corona SDK. This is what I already have as I was using gremlininteractive plugin.

plugins =

{

     – key is the name passed to Lua’s ‘require()’

     [“plugin.paypal”] =

     {

          – required

          publisherId = “com.gremlininteractive”,

     },

},

Regards,

Obadah

I didn’t realize that I was posting from other account. @DavidRangel I can only see documentation for self-hosted plugins and submission. Is there any link that explains how I can use it directly with Corona SDK?

I figured that out, thank you. Now I have been using facebook and chartboost plugin available for Corona SDK. How can I use these when I build the project via Xcode? It is giving me an error:

module ‘facebook’ not found:resource (facebook.lu) does not exist in archive …

 

Regards,

Obadah