iOS problem

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?

Very unlikely.

You should do some debugging: Is the function firing on iOS? Is the condition where the alert is supposed to be shown firing? etc.

The code that you’ve provided can’t be run by anyone, so you’ll need to provide code that others can use to reproduce your issue or you’ll need to debug it yourself.

The function call is firing on iOS, but the ten one-second ticks, where the display is supposed to count down, is not showing on a device, only in the simulator on the Mac. And since it is not counting, it never reaches zero to show the ALERT.

I have made many revisions of my app, but never experienced that it runs on the simulator and not on a device.