I'd like to use mergBgTask to execute code continually while the app is in the background.
I want the app to continually check a LiveCloud table to see if something is in the relevant table reference, and then send a notification if there is.
I've seen from years ago, someone asking about something similar, and they were told this: "The idea behind background tasks is to complete a take you started while the app was in the foreground. You can't start a new task while in the background." https://stackoverflow.com/questions/298 ... 0#78076550
I'm not sure what to conclude from this and if someone knows whether code cannot be continually running in the background please let me know.
My code would be something like this:
Code: Select all
on UIApplicationWillResignActiveNotification
mergBgTaskStart
do checklivecloud
end UIApplicationWillResignActiveNotification
on checklivecloud
(check for something in table reference of Livecloud table, if it is blah blah notification etc)
send dolivecloud to me in 10 seconds
end checklivecloud