facebook canShowPopup returns false on iOS7 (Social Plugin)

Hey @Rob, I fixed it. I moved a plugins table code on the top of a settings table in build.settings file. When it’s at the first place - before Android or iPhone settings, then social plugin works fine. If I move it down in the table (exact same code) - it doesn’t load the plugin library. Strange thing :slight_smile: Anyway, it works now.

This works fine:

settings = { plugins = { -- key is the name passed to Lua's 'require()' ["CoronaProvider.native.popup.social"] = { -- required publisherId = "com.coronalabs", }, }, android = { versionCode = "1" }, androidPermissions = { "android.permission.VIBRATE", "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", }, iphone = { components = {}, plist = { UIAppFonts = { "Moon Flower Bold.ttf", }, CFBundleIconFiles = { "iTunesArtwork.png", "Icon.png", "Icon@2x.png", "Icon-40.png", "Icon-40@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon-Small.png", "Icon-Small@2x.png" }, UIPrerenderedIcon = true, UIStatusBarHidden = true, UILaunchImageFile = "Default", }, orientation = { default = "portrait", supported = { "portraitUpsideDown", "portrait" } }, }, }

this doesn’t work:

settings = { android = { versionCode = "1" }, androidPermissions = { "android.permission.VIBRATE", "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", }, iphone = { components = {}, plist = { UIAppFonts = { "Moon Flower Bold.ttf", }, CFBundleIconFiles = { "iTunesArtwork.png", "Icon.png", "Icon@2x.png", "Icon-40.png", "Icon-40@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon-Small.png", "Icon-Small@2x.png" }, UIPrerenderedIcon = true, UIStatusBarHidden = true, UILaunchImageFile = "Default", }, plugins = { -- key is the name passed to Lua's 'require()' ["CoronaProvider.native.popup.social"] = { -- required publisherId = "com.coronalabs", }, }, orientation = { default = "portrait", supported = { "portraitUpsideDown", "portrait" } }, }, }

Ah!  Then there is likely an error in your build.settings file further down that was causing it to stop parsing.  If you have lua installed locally you can do:

lua build.settings

and if there are syntax errors, it should give you an error. 

Rob

could you tell me how can I check it in sublime text? I’m testing corona editor now

I don’t know of a way using sublime text other than using your eye’s to look for problems.  I took yours and it didn’t have any syntax errors, so there is something besides a syntax error tricking it out.

I don’t know a good way to identify that.

Rob

Me neither :slight_smile: You mentioned lua installotion so I thought you were saying about some particullar lua sdk or sth. Before sublime text I’ve been using eclipse koneki for lua and it instantly showed when a syntax error appeared. But it didn’t give me any errors in this build settings file. Anyway, I’ll just leave it on the top of the table. Thanks for your help

BTW: do you know if there is a way in Corona Editor to check if there weren’t accidentally any global variables left (due to local name typo’es in local registrations etc). Eclipse highlighted them with a bold font, but in sublime text there’s no visually difference between locals and globals

You can also just paste your build.settings into main.lua and that should tell if if there are any syntax errors.

thanks @dchan, I changed the extension, but your idea is easier :slight_smile: Anyway - it didn’t show me any syntax errors, so it’s magic! :slight_smile: