You may want to check whether there are updates available to an app. We suggest you do this by having a remote data source that contains the information about the latest version of the app. In that data source you should have two values: the latest version of the app and the minimum version of the OS required for the app. Let's assume [[ds:/conf/upgrade/latestversion]] and [[ds:/conf/upgrade/minos]] return these two values. Armed with that you can do the following steps.

First, determine how often you want to to bug the user who select "Remind me later". Let's say you want to bug the user every 5 days. You can use this expression to calculate when to next bug the user:


[[sys:gmtTime:add 5|mul 86400]]

86,400 is the number of seconds in a day. By adding 5 x 86,400 to the current time, it determines the next time to bug the user for an upgrade. You want to store that in a variable when the app first runs, that would be in the launch event, but only if the variable is empty. Secondly, you want to save that variable for use in the next session, that way the variable isn't reinitialized every time the app runs. Here we'll call this variable nextremindertime. Now you need to calculate this value and store it in a variable, let's call it ucstring


Wherever in your app logic you decide to check for an upgrade you can add the condition that [[var:ucstring]]. You just need to check whether that equals "yes" (without the quotes) or not. When it does equal "yes" it's time to prompt the user for an upgrade.

By the way, if the user opts never to be reminded again, just set nextremindertime to a very large value, which represents an epoch time in the very far in the future. For example, 5060708090 is easy to type and very, very far in the future.