How do I update my plugins?

Apologies if this has been documented somewhere but I couldn’t find a clear answer. I’m trying to update my game for the first time since the transition to Solar2d and I’m having trouble getting the simulator to run because it can’t find a number of plugins. I’m using simulator version 2020.3594. Below is a list of the plugins I use. At this moment, the simulator is complaining about “plugin.mwc” but I suspect it can’t find some of the other plugins either. Is there an easy way to migrate the list of plugins? If there is a guide for this, please point me in the right direction.

plugins =
    {
		-----------------
		-- ADS
		-----------------
		["plugin.vungle"] =
        {
            publisherId = "com.vungle"
        },

		["plugin.facebook.v4a"] =
        {
            publisherId = "com.coronalabs"
        },

		["plugin.facebookAnalytics"] =
        {
            publisherId = "tech.scotth"
		},

		["plugin.appsflyer"] =
        {
            publisherId = "com.coronalabs"
        },

		["plugin.google.iap.v3"] =
        {
			publisherId = "com.coronalabs",
			supportedPlatforms = { android = true }
        },

		["plugin.gpgs.v2"] = {
			publisherId = "com.coronalabs",
			supportedPlatforms = { android = true }
		},

		["CoronaProvider.gameNetwork.apple"] =
        {
            publisherId = "com.coronalabs"
        },

		["plugin.flurry.analytics"] =
		{
			publisherId = "com.coronalabs"
		},

		["plugin.openssl"] =
		{
			publisherId = "com.coronalabs"
		},

		["plugin.notifications.v2"] =
		{
			publisherId = "com.coronalabs"
		},

		["plugin.mwc"] =
		{
			publisherId = "com.xibalbastudios"
		},

		["CoronaProvider.native.popup.social"] =
        {
			publisherId = "com.coronalabs"
        },

		["CoronaProvider.native.popup.activity"] =
        {
			publisherId = "com.coronalabs",
			supportedPlatforms = { iphone=true }
        },

		["plugin.reviewPopUp"] =
		{
			publisherId = "tech.scotth",
		},

		["plugin.storeView"] =
        {
            publisherId = "tech.scotth"
        },
    },

Different plugins, but I was just about to post the same question!

Hi @developer0744.

I’m hoping to have a more official solution soon, but in the meantime if you need MWC, it’s just a Lua file and may be found here.

@StarCrunch, thank you that is a big help! And thank you for contributing that plugin.

@Jaime_Alemany, after doing some more digging, it looks like 3rd party plugins will follow this convention (I got this example from Scott Harrison’s Solar2d Marketplace)

["plugin.helpshift"] =
{
	publisherId="scotth.tech",
	supportedPlatforms = {
		iphone = { url="https://solar2dmarketplace.com/marketplacePlugins?ID=INSERT_ACCOUNT_ID_HERE&plugin=HelpshiftPlugin_scotth-techtype=iOS"},
		android = { url="https://solar2dmarketplace.com/marketplacePlugins?ID=INSERT_ACCOUNT_ID_HERE&plugin=HelpshiftPlugin_scotth-tech&type=Android"},
		macos = { url="https://solar2dmarketplace.com/marketplacePlugins?ID=INSERT_ACCOUNT_ID_HERE&plugin=HelpshiftPlugin_scotth-tech&type=MacOS" }, --Only works with Corona Simulator 3592+
		win32 = { url="https://solar2dmarketplace.com/marketplacePlugins?ID=INSERT_ACCOUNT_ID_HERE&plugin=HelpshiftPlugin_scotth-tech&type=Windows" }, --Only works with Corona Simulator 3592+
	}
},

The trick is to know what to put for the url attribute. I still don’t know where other 3rd party plugins are hosted, for example Vungle. So if anyone else has any insight I’d be grateful.

1 Like

@developer0744, thanks for sharing!

Do you - or anyone else - know if, for an android plugin, that url should point to a “jar” file? Would that work?

@Jaime_Alemany unfortunately I don’t know. If @vlads or another guru could weigh in that would be a huge help :slightly_smiling_face:

It’s self hosted plugins that’s been enabled for all users now. Documented here: https://docs.coronalabs.com/native/hostedPlugin.html

It’s up to the individual plugin developers to migrate their plugins to a new marketplace. Scott has already launched solar2dmarketplace.com and migrated a number of his own plugins there, and I believe is accepting other vendors, and I’m close to launching solar2dplugins.com which is more like the old marketplace. It’s entirely up to the individual plugin vendors to decide whether to use our marketplaces or set up something of their own, but I’m hopeful people will opt for submitting to all available marketplaces and it’ll end up being as easy to find and activate a plugin as it was before.

@richard11, thank you that explains a lot! Are you saying that there’s currently no way to get the 3rd party plugins that were hosted on the old Corona marketplace (eg, Vungle)?

You can download the files and place them in the appropriate folder within Solar2D manually instead of using the self hosted plugins mechanism, but if you do it this way, Solar2D won’t know to pull in updates to those plugins when available.

There’s talk of setting up a Github repository for all of the open source plugins to be migrated to, but it’s all very much a case of seeing where individual vendors decide to move their own plugins to with everything else.

I also have this doubt, as I add the admob plugin that is now free on Solar2D 2020.3594. Without needing an online market for this. If I download the plugin here https://github.com/coronalabs/com.coronalabs-plugin.admob/releases, which folder do I put in?

If so, where would that folder be? Do I put it in the folder of the application I’m doing or inside the folder of the corona?

Hi richard,
What are those appropiate folders? I do not found any documentation about that.

@vlads referenced this tree recently, but I’ve not tried it myself:

($HOME or $AppData)/Solar2DPlugins/[publisherId]/[plugin]/[build]/[platform]/data.tgz

1 Like

There’s also talk of building in a plugin import tool to the simulator itself so that Solar2D can drop your downloaded files into the right directories for inclusion.

I already went to that directory, added the folders and even then it is giving an error!

13:39:46.719 Warning:
13:39:46.719 The signer’s certificate is self-signed.
13:39:46.719
13:39:46.719 The timestamp will expire on 2030-10-16.
13:39:59.848 Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
13:39:59.848 ERROR: configuring ‘shared.android.support.v4’ failed!
13:39:59.848
13:39:59.848 FAILURE: Build failed with an exception.
13:39:59.848
13:39:59.848 * Where:
13:39:59.848 Build file ‘C:\Users\mathe\AppData\Local\Temp\Corona Labs\CLtmpa18040\template\app\build.gradle.kts’ line: 274
13:39:59.848
13:39:59.848 * What went wrong:
13:39:59.848 Could not open dsl remapped class cache for eai1t831g7ld85aqx4tledj29 (C:\Users\mathe.gradle\caches\5.4.1\scripts-remapped\corona_29jlwnojpjupqgawmxll5gyxq\eai1t831g7ld85aqx4tledj29\dsldcd040730888da95d185715568c9cc57).
13:39:59.848 > Could not open dsl generic class cache for script ‘C:\Users\mathe\AppData\Local\Temp\Corona Labs\CLtmpa18040\template\app\build\corona-plugins\shared.android.support.v4\corona.gradle’ (C:\Users\mathe.gradle\caches\5.4.1\scripts\eai1t831g7ld85aqx4tledj29\dsl\dsldcd040730888da95d185715568c9cc57).
13:39:59.848 > Could not compile script ‘C:\Users\mathe\AppData\Local\Temp\Corona Labs\CLtmpa18040\template\app\build\corona-plugins\shared.android.support.v4\corona.gradle’.

Other plugins work during offline assembly simply move the com.coronalabs folder from the Caches folder to the folder:
/Users/user_name/Solar2DPlugins/com.coronalabs
But unfortunately I was not able to get my plugin to work, I get an error. Here is the topic:

Just to update everyone following this thread, I was able to get the Solar2d plugins to work by upgrading from Mojave to Catalina and upgrading Xcode to 11.4.1, using simulator build 3595. At the moment, I cannot get 3rd party plugins to work from solar2dmarketplace.com. The simulator just crashes when the build starts. More info is available here

Looking into this :+1: will respond to this in the thread

Hi @Scott_Harrison I used the URL you sent me and I’m still getting this during the build process…
ERROR: Runtime error
?:0: attempt to index a nil value
stack traceback:
?: in function ‘pathJoin’
?: in function ‘?’
?: in function ‘?’
?: in function ‘?’
?: in function ‘collect’
?: in function <?:110>
Program completed in 56.87 seconds (pid: 86728).

This is mostly likely because you have not clicked the activate button. I am looking at your account an it looks like you have no plugins activated based on your account id you posted in an earlier thread