I got sample code online about in-app purchases. When the purchase completes, I want a value to state it is bought.
For example, an integer within the app could be equal to 1 or a string could say “Bought”. The user will not see this, it is just for reference. When the user goes to the storefront next time, if they hit a button, I want it to check to see if this value is equal to 1 or Bought. If it is, I will have it move to the next page from there.
How can this be done?
Check out this tutorial on In-App Purfchases.
Edit:
There are quite a few ways to achieve what you are looking for. No one will write your code for you ( unless you hire them ;-D ). You should look more into the StoreKit framework to get a better understanding of how it works. You will then learn how to manage purchases and how to check if an item is purchased.
For In-App purchases, I like to use UrbanAirship‘s In-App Purchase classes.
This is how I keep local tabs on items purchased in one of my apps: