The Query Purchases and Restore Purchases (iOS) buttons retrieve information about the purchases of the current user from the app store. The buttons work by executing, respectively, the Query Purchases action and Restore Purchases action. The difference between the two actions is that the Restore Purchases action, in addition to retrieving in-app purchases carried out from the app on the current device, also restores purchases made by the current user on other devices. This is a requirement of the iOS app store and has therefore entailed that a separate action be created for the purpose.
In our simulation, the two buttons both update the Purchases element of the $MT_IN-APP_PURCHASE page source with information relating to purchases that is fetched from the simulation data file.
Additionally, note the following:
•Since the Restore Purchases button should be available only on iOS devices, the row containing the button has its visibility made conditional on the device being an iOS device. This has been done by setting the rows's Visible property to check the value of the static variable $MT_iOS.