Plugins 'Hell'

I’m not understanding how supportedPlatforms is supposed to work.  I tried this in the first part of my plugins settings

settings = {     plugins =      {         ["plugin.amazon.iap"] = { publisherId = "com.amazon", supportedPlatforms = { android-kindle = "true" },},         ["CoronaProvider.gameNetwork.google"] = { publisherId = "com.coronalabs", supportedPlatforms = { android = true },},         ["CoronaProvider.ads.vungle"] = { publisherId = "com.vungle", },         ["plugin.carrot"] = { publisherId = "com.gocarrot", },     },  

but if I attempt to build for a device I get an error message popup “There is an error in your build.settings.”  and the console says "Syntax error: …/build.settings:5: ‘}’ expected near ‘=’ "  but I don’t see the syntax error.  Is supportedPlatforms supposed to work for all plugins?

-Stephen

If you post your full build.settings, perhaps we could help spot the error.

I just tried supportedPlatforms for the iAds plugin, and it worked for me.

  • Andrew

I tried building without the supportedPlatforms on the Amazon plugin and there was no syntax error.  I still had it enabled for the google gameNetwork and Vungle plugins so I guess it doesn’t work for Amazon plugin, which is still in beta test.  

But I hope it will eventually work for the Amazon plugin as well since that is one of the ones I have to manually comment out of build settings if I’m not building specifically for Kindle.

(I know in the sample above I had the “true” in …android-kindle = true… surrounded by quotes, but that wasn’t the issue.  That was just me trying various things to get it to work and I cut and paste that version here.  Both ways produced the syntax error with the Amazon plugin)

Yes, this looks like a error:

supportedPlatforms = { android-kindle = true }

name of variable is with “-” - that is definetly a mistake =(

Can Tom fix it in his post? maybe there should be different names? like “android_kindle”?

Yes, we looked into this and the server is getting hung up on the dashes in the key. Try the following:

supportedPlatforms = { “android-kindle” = true }

Tom, wouldn’t the more likely fix be this?

supportedPlatforms = { [“android-kindle”] = true }

You’d need brackets around a string key that has special characters.

  • Andrew

@Andrew, yes you’re right. Thanks.

@Tom -

I want to clarify when you say the supported platforms include android-kindle. Does that mean the plug-in will be included when, during the compile process, you target the “Amazon” store? Or, does it mean at run time, the app will try to detect if you are on a Kindle Fire, and if you are, then include the plug-in? (This is a potential problem for the Amazon market since that market could be downloaded onto none-Kindle Fire devices)

I am assuming it’s the first, (it is build.settings, after all) but want to confirm.

@Tom -

I want to clarify when you say the supported platforms include android-kindle. Does that mean the plug-in will be included when, during the compile process, you target the “Amazon” store? Or, does it mean at run time, the app will try to detect if you are on a Kindle Fire, and if you are, then include the plug-in? (This is a potential problem for the Amazon market since that market could be downloaded onto none-Kindle Fire devices)

I am assuming it’s the first, (it is build.settings, after all) but want to confirm.

And how to include Samsung?

Any docs/info about supportedPlatforms more then this thread?

iphone

iphone-sim

android

android-nook

android-kindle

Those are the only “platforms” that are currently recognized via this system. If you’re targeting samsung android devices just use the android key if you’re using a plugin that is android only.

And how to include Samsung?

Any docs/info about supportedPlatforms more then this thread?

iphone

iphone-sim

android

android-nook

android-kindle

Those are the only “platforms” that are currently recognized via this system. If you’re targeting samsung android devices just use the android key if you’re using a plugin that is android only.