HI Rob,
Getting this error message for one signal plugin, when I remove it and replace it with google play plugin, it’s working. I just followed the “require” coding on main.lua as per documentation: the plugin is already activated on my account. this is my settings.lua
settings = { plugins = { ["plugin.OneSignal"] = { publisherId = "com.onesignal", supportedPlatforms = { android=true }, }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true }, }, } orientation = { -- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight default = "portrait", supported = { "portrait" } }, android = { usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.ACCESS\_FINE\_LOCATION", "android.permission.ACCESS\_COARSE\_LOCATION", }, }, }
ERROR: Runtime error 18:18:36.230 ?:0: attempt to call a nil value 18:18:36.230 stack traceback: 18:18:36.230 ?: in function 'require'
function DidReceiveRemoteNotification(message, additionalData, isActive) if (additionalData) then if (additionalData.discount) then native.showAlert( "Discount!", message, { "OK" } ) -- Take user to your app store elseif (additionalData.actionSelected) then -- Interactive notification button pressed native.showAlert("Button Pressed!", "ButtonID:" .. additionalData.actionSelected, { "OK"} ) end else native.showAlert("OneSignal Message", message, { "OK" } ) end end local OneSignal = require("plugin.OneSignal") -- Uncomment SetLogLevel to debug issues. -- OneSignal.SetLogLevel(4, 4) OneSignal.Init("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "############", DidReceiveRemoteNotification)