Does suspend mode stop this?

I have a function like this:

local function makeEffect() .... timer.performWithDelay(2000, function() transition.to(obj, {time=15000, x=myX, y=myY,..., onComplete=function() makeEffect() end}) end) end

Please note that onComplete calls makeEffect() again, so I want it to loop infinitely.

There is no problem that this function keeps being called to make some effect for my app. 

However, when I enter suspended mode (by pressing Home key in an iOS device) for long enough and re-enter the app, makeEffect() seems not there anymore.

Is there any rule to stop this working?

I had something similar affect my game. What I did was call the make effect function again on a application resume event.

That should fix it for you

But I am not sure if the make effect function has stopped or not.

In my testing, suspend mode does not always stop the function.

How about cancelling the transition on a suspend event then?

That way you can be sure it isn’t running

I had something similar affect my game. What I did was call the make effect function again on a application resume event.

That should fix it for you

But I am not sure if the make effect function has stopped or not.

In my testing, suspend mode does not always stop the function.

How about cancelling the transition on a suspend event then?

That way you can be sure it isn’t running