I have this game where the user collects coins and I want them to be able to save them and use the coins for in app purchaces. How would I do this? Could I use NSUserDefaults for this or is it something else? Thanks! I used this for saving the highScore:
EDITED
var coinDefaults = NSUserDefaults()
var coinScore = defaults.integerForKey("coinScore")
if(coins > 0)
{
coinDefaults.setInteger(coins, forKey: "coinScore")
}
var showCoins = coinDefaults.integerForKey("coinScore")
coinLabel.text = String(showCoins)
}