here’s my main.lua:
-- 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) 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("0ecdd9b6-74c6-4115-9a6a-1f50537f7d62", "717121253104", DidReceiveRemoteNotification)
and my build.settings:
settings = { iphone = { plist= { UIBackgroundModes = {"remote-notification"}, UIApplicationExitsOnSuspend = false, UIPrerenderedIcon = true, UIStatusBarHidden = false, NSAppTransportSecurity = { NSExceptionDomains = { NSAllowsArbitraryLoads = true, ["coronalabs.com"] = { NSIncludesSubdomains = true, NSThirdPartyExceptionAllowsInsecureHTTPLoads = true }, ["youtube.com"] = { NSIncludesSubdomains = true, NSThirdPartyExceptionAllowsInsecureHTTPLoads = true }, ["google.com"] = { NSIncludesSubdomains = true, NSThirdPartyExceptionAllowsInsecureHTTPLoads = true }, }, }, }, }, orientation = { default = "portrait", supported = { "portait", "portraitUpsideDown", }, }, android = { usesPermissions = { -- Required by the MapView to fetch its contents from the Google Maps servers. "android.permission.INTERNET", -- Optional permission used to display current location via the GPS. "android.permission.ACCESS\_FINE\_LOCATION", -- Optional permission used to display current location via WiFi or cellular service. "android.permission.ACCESS\_COARSE\_LOCATION", "com.google.android.c2dm.permission.RECEIVE", }, usesFeatures = { -- If you set permissions "ACCESS\_FINE\_LOCATION" and "ACCESS\_COARSE\_LOCATION" above, -- then you may want to set up your app to not require location services as follows. -- Otherwise, devices that do not have location sevices (such as a GPS) will be unable -- to purchase this app in the app store. { name = "android.hardware.location", required = false }, { name = "android.hardware.location.gps", required = false }, { name = "android.hardware.location.network", required = false }, }, }, plugins = { ["plugin.OneSignal"] = { publisherId = "com.onesignal", }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true, ["android-kindle"]=true }, }, }, }
https://gyazo.com/686117a46b6559fe3931008c235c743b
https://gyazo.com/2936991f5bbc61fab09e8dae66bb8990
pictures of the errors