Corona Enterprise Unlimited customers can enable plugins hosted on
Plugins must be packaged for each platform separately as a .tgz
file and hosted on a web server.
Follow the Plugins guide to build your plugin, then package the plugin on your server. The plugin needs to be stored in a flat (no directories) .tgz
format.
For example, from inside your plugin build folder, run:
tar -czf myplugin.tgz myplugin.lua metadata.lua
Upload the resulting .tgz
file to a web server that is accessible from the Internet. If necessary, https://
and basic authentication are supported for security and access control.
The Corona Simulator only accesses hosted plugins for device builds. When it comes to running these plugins in the Simulator, you must install these plugins locally by placing the plugin file in the following directory:
~/Library/Application Support/Corona/Simulator/Plugins/
This file should match the name used as the key in the plugins
table, for example "plugin.bit.lua"
in the build.settings
example below.
In order to use hosted plugins with your Corona project, the following changes to build.settings
must be made:
For each device platform, you must tell Corona the URL from which to fetch the plugin .tgz
file.
In the supportedPlatforms
table for the plugin, each platform property key's value should contain the URL pointing to the .tgz
plugin file.
For each Simulator platform, you must tell Corona not to attempt download of a .tgz
file.
In the supportedPlatforms
table for the plugin, the macos
and win32
key values should be false
.
If you wish to use the plugin in the Corona Simulator, you must install the plugin locally as noted above.
Here is an example of including a hosted plugin within build.settings
:
settings = { plugins = { ["plugin.hostedplugin"] = { publisherId = "com.company", supportedPlatforms = { iphone = { url="http://test:abc123@example.com/plugin/iphone.tgz" }, android = { url="http://test:abc123@example.com/plugin/android.tgz" }, macos = false, win32 = false }, }, }, }
The maximum compressed size for the .tgz
file is 25 MB. The maximum uncompressed size for the .tgz
file is 50 MB.
The Corona Simulator will throw an error on launch/relaunch saying that the plugin couldn't be downloaded. This message is safe to ignore.