Thanks! The Restore Purchases is pretty straightforward.
1.) Setup your In App Purchase during the app initialization. Mine looks like:
// In-app Purchase Data
InAppPurchaseSetTitle ("iTrippin")
InAppPurchaseAddProductID ("com.linkedpixel.itrippin.removeads", 0)
InAppPurchaseSetup()
2.) After initializing and setting up the IAP, check to see if the user has already unlocked the full version.
If GetInAppPurchaseAvailable(0)
// Successfully upgraded app, unlock full version
unlockApp()
Endif
3.) When the user presses the Restore button, call InAppPurchaseRestore() as follows:
// Call in-app purchase restore
InAppPurchaseRestore()
// Wait for restore process to complete
While GetInAppPurchaseState() = 0
Sync()
EndWhile
// User has canceled or no purchase found
If GetInAppPurchaseAvailable(0) < 1
// Show alert
Message("An error has occurred while attempting to restore your purchases, or no purchases were found.")
// User has upgraded!
ElseIf GetInAppPurchaseAvailable(0)
// Successfully upgraded app, unlock full version
unlockApp()
Endif