I have implemented a nag timer in my app. For non-paying users I have introduced a timer counting from 10 to 0 before action is taken. Compiled on a PC, it works fine on both the simulator and on an Android device. On a Mac, it works OK in the simulator, but on a device the counting freeze at 10.
To start the counting, I use
tmrSpawn = timer.performWithDelay( 1000, nagLite, 10 )
The nagLite function looks like this,
function nagLite (event)
nagTimer = nagTimer - 1
RButton:setLabel(tostring(nagTimer))
if (nagTimer == 0) then
native.showAlert(“ALERT”, “Are you sure?”, {“ACCEPT”, “REJECT”}, onAccept)
end
end
Is there a bug in the compiler?