Hi Team,
I tried a new main.lua and copied the exact given code on one signal documentation. This is supposed to be a fresh start. I’ve been using google play plugins for awhile now so i know how to edit my settings.lua. It surprised me when I got this runtime error message only for ONE SIGNAL:
18:52:28.867 ERROR: Runtime error 18:52:28.867 ?:0: attempt to call a nil value 18:52:28.867 stack traceback: 18:52:28.867 ?: in function 'require' 18:52:28.867 F:\bin\main.lua:35: in main chunk
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", }, }, }
--###################################################### --###############ONE SIGNAL############################# -- This function gets called when the user opens a notification or one is received when the app is open and active. -- Change the code below to fit your app's needs. function DidReceiveRemoteNotification(message, additionalData, isActive) print(message) end local OneSignal = require ("plugin.OneSignal") --OneSignal.SetLogLevel(4, 4) OneSignal.Init("xxx", "xxx", DidReceiveRemoteNotification)
I’m sure that my keys are correct but the problem i think, corona is not getting the plugin to integrate on my app. It is already activated on my account and I only have 1 account for both simulator and marketplace.
Please help.