native.showpopup activity

I am calling the activity popup on iOS. But it keep showing error from console telling me “attempt to concatenate a table value” when calling the native.showpoup. Here is my code

local itemsOptions = { { type = "string", value = "Hello World!" }, } native.showPopup{ "activity",{items=itemsOptions,} }

And I added the plugin to the build.settings:

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

I am using corona sdk 2016.2948(2016.9.14), xcode 7.3 (not upgraded yet) and deployed to iphone in iOS 9.3.5

itemsOptions is a table of tables.

local itemsOptions = {     {             { type = "string", value = "Hello World!" },     } }

Hi Rob,

I updated to table of tables and test again. I am still getting the same error. Any idea?

Thanks

Can you post your current code and also copy/paste the entire error message from your console.log?

Thanks

Rob

Hi Rob,
 
Here is my code

function openSharing(extraData)   local shareText = "This is the text I want to share"   if system.getInfo("targetAppStore") == 'google' then native.showPopup(  "social",  { message = shareText, }  ) elseif system.getInfo("targetAppStore") == 'apple' then   local itemsOptions = { { { type = "string", value = shareText }, } }   native.showPopup{ "activity", { items=itemsOptions, } }   end end

Here is the error I got:
 

Oct 12 10:02:23 iPhone Chop Stick[208] \<Warning\>: ERROR: Runtime error ?:0: attempt to concatenate a table value stack traceback: ?: in function '\_getProvider' ?: in function 'showPopup' ?: in function 'openSharing' ?: in function \<?:1034\> ?: in function \<?:169\> Oct 12 10:02:23 iPhone Chop Stick[208] \<Warning\>: Handling the unhandled error: ?:0: attempt to concatenate a table value

I am using corona sdk 2016.2948(2016.9.14), xcode 7.3 (not upgraded yet) and deployed to iphone in iOS 9.3.5

Sorry. I found a wrong syntax in my code. The problem is fixed now.

  1. I was missing a platform in build.settings
    supportedPlatforms = { iphone=true, [“iphone-sim”]=true },

  2. Wrong Syntax

local itemsOptions = {{type = “string”, value = “This is my share text”}}
native.showPopup(“activity”,{items= itemsOptions})

Here is the sample code of this plugin:

https://github.com/coronalabs/plugins-source-native-popup-activity

itemsOptions is a table of tables.

local itemsOptions = { &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { type = "string", value = "Hello World!" }, &nbsp; &nbsp; } }

Hi Rob,

I updated to table of tables and test again. I am still getting the same error. Any idea?

Thanks

Can you post your current code and also copy/paste the entire error message from your console.log?

Thanks

Rob

Hi Rob,
 
Here is my code

function openSharing(extraData) &nbsp; local shareText = "This is the text I want to share" &nbsp; if system.getInfo("targetAppStore") == 'google' then native.showPopup(&nbsp; "social",&nbsp; { message = shareText, }&nbsp; ) elseif system.getInfo("targetAppStore") == 'apple' then &nbsp; local itemsOptions = { { { type = "string", value = shareText }, } } &nbsp; native.showPopup{ "activity", { items=itemsOptions, } } &nbsp; end end

Here is the error I got:
 

Oct 12 10:02:23 iPhone Chop Stick[208] \<Warning\>: ERROR: Runtime error ?:0: attempt to concatenate a table value stack traceback: ?: in function '\_getProvider' ?: in function 'showPopup' ?: in function 'openSharing' ?: in function \<?:1034\> ?: in function \<?:169\> Oct 12 10:02:23 iPhone Chop Stick[208] \<Warning\>: Handling the unhandled error: ?:0: attempt to concatenate a table value

I am using corona sdk 2016.2948(2016.9.14), xcode 7.3 (not upgraded yet) and deployed to iphone in iOS 9.3.5

Sorry. I found a wrong syntax in my code. The problem is fixed now.

  1. I was missing a platform in build.settings
    supportedPlatforms = { iphone=true, [“iphone-sim”]=true },

  2. Wrong Syntax

local itemsOptions = {{type = “string”, value = “This is my share text”}}
native.showPopup(“activity”,{items= itemsOptions})

Here is the sample code of this plugin:

https://github.com/coronalabs/plugins-source-native-popup-activity