For some reason I can’t remember how to fix a nil:
This is what I have that caused this error: attempt to index global ‘coordinatedUniversalTime’ (a nil value)
system.scheduleNotification( coordinatedUniversalTime [options] )
– Options for iOS
local options = {
–alert = “Wake up!”,
–badge = 2,
–sound = “alarm.caf”,
–custom = { foo = “bar” }
}
– schedule using seconds from now
–local notification = system.scheduleNotification( 60, options )
– schedule using UTC (Coordinated Universal Time)
local utcTime = os.date( “!*t”, os.time() + 60 )
local notification = system.scheduleNotification( utcTime, options )
local listener = function( event )
–print( event.name ) – ==> “notification”
–print( event.custom.foo ) – ==> “bar”
end
Runtime:addEventListener( “notification”, listener )
[import]uid: 69302 topic_id: 31282 reply_id: 331282[/import]