JasonBourne
JasonBourne

Reputation: 338

Guidance / Advice on unlocking In-App Purchases

I am looking for some advice / guide on the best way to unlock content from in-app purchases.

I have a list of 100 words. I have the broken into 25 units. The first unit of 25 is free and the remaining 3 units can be unlocked after you purchase them from an in-app purchase. No content will be downloaded.

All 100 words are currently stored in an array.

After the purchaser buys a unit, I want that specific segment to become available.

So if they buy unit 3, then the word list should include units 1 and 3.

What is the best way to implement this? Should I use 4 different NSArrays for the word sets? And then just load a master NSArray with the purchased words?

Upvotes: 1

Views: 123

Answers (2)

Ryan Poolos
Ryan Poolos

Reputation: 18561

For the bare minimum you could use four NSArrays and then add them to an NSMutableArray as they are purchased. And use NSUserDefaults to store a boolean for each possible purchase.

Upvotes: 1

Jean
Jean

Reputation: 7673

I don't know wether or not I understand your question correctly.

Maybe you could put everything into one big array and have a max_available_index. Each purchase increments this index. The user is never allowed to access items beyond this maximum index.

If your unit size is 25, then buying 3 units increments the max_available_index by 75.

Upvotes: 0

Related Questions